
###########################################################################
####                                                                   ####
####             Scrutinizing Lightened Scrutiny:                      ####
#### The Divergence in Appellate Courts' Reactions to Larger Workloads ####
####                                                                   ####
####           Adam Chilton, Rachel Crouch, Shay Lavie                 ####
####                                                                   ####
####                        April 28, 2011                             ####
####                                                                   ####
###########################################################################

## Please note:  The data used for this papper no longer publicly available.  
## It can be obtained by filing a request with ICPSR for the Federal Court Cases 
## Integrated Database from Federal Judical Center for 1998 - 2005.

###########################################################################

## Replication code for Figures 7 - 9 (Parts III and IV of our paper):

###########################################################################

## Loading libraries:

library(Zelig)
library(Design)

###########################################################################

## Loading Data:

setwd("/Users/Rachel Crouch/Dropbox/Gov 2001 - Huang Replication Data/New - Excel CSV Datasets")

data1998 <- read.csv("Appellate Terminations-1998-3.csv")
data1999 <- read.csv("Appellate Terminations-1999-3.csv")
data2000 <- read.csv("Appellate Terminations-2000-3.csv")
data2001 <- read.csv("Appellate Terminations-2001-3.csv")
data2002 <- read.csv("Appellate Terminations-2002-3.csv")
data2003 <- read.csv("Appellate Terminations-2003-3.csv")
data2004 <- read.csv("Appellate Terminations-2004-3.csv")
data2005 <- read.csv("Appellate Terminations-2005-3.csv")

###########################################################################

#### Binding Data ####

total.data <- rbind(data1998, data1999, data2000, data2001, data2002, data2003, data2004, data2005)

###########################################################################

#### Cleaning Data #### 


total.data2 <- total.data[total.data$APPTYPE %in% c(3, 4),  ] 
##leaving only civil cases,##
##what about bankruptcy cases? coded 11,12##

total.data1 <- total.data2[total.data2$CIRCUIT>=1,] 
##removing D.C. Circuit##

total.data3 <- total.data1[total.data1$REOPEN==-8,]  
##leaving only initial case openings (excluding##
##reopened/remanded appeals) [I am not sure this## 
##assumption makes sense; maybe we can later try##
##to see what happens when we leave these cases. SL]##


total.data4 <- total.data3[total.data3$JOINAPP %in% c(-8, 3,1),  ] 
##removing consolidated cases and cross appeals##
##I was not sure what to do with cross-appeals, not consolidate##
##so I added them to the data. SL##

total.data5 <- total.data4[total.data4$JDGCODE2 %in% c(-8), ] 
## excluding en banc cases##

total.data6 <- total.data5[total.data5$NOS %in% c(-8:366, 369:500,610:999), ] 
##excluding asbestor cases (coded 368) and prisoners' fiilng##
##again, maybe we should run this with asbestos##

total.data7 <- total.data6[total.data6$OUTCOME!=-8, ] 
##OPTIONAL HERE-Excluding missing outcome cases. SL##


clean.data <- as.data.frame(total.data6)


###########################################################################

##Creating dataframe for case-level models:

##Creating dummies for the "flood" variables:

FLOOD.2d.v1 <- ifelse(clean.data$CIRCUIT==2 & (clean.data$JUDGQY == 20024 | 
clean.data$JUDGQY == 20031 | clean.data$JUDGQY == 20032 | clean.data$JUDGQY == 20033 | 
clean.data$JUDGQY == 20034 | clean.data$JUDGQY == 20041 | clean.data$JUDGQY == 20042 | 
clean.data$JUDGQY == 20043 | clean.data$JUDGQY == 20044 | clean.data$JUDGQY == 20051 | 
clean.data$JUDGQY == 20052 | clean.data$JUDGQY == 20053 | clean.data$JUDGQY == 20052), 1,0)

FLOOD.2d.v2 <- ifelse(clean.data$CIRCUIT==2 & (clean.data$JUDGQY == 20032 | 
clean.data$JUDGQY == 20033 | clean.data$JUDGQY == 20034 | clean.data$JUDGQY == 20041 | 
clean.data$JUDGQY == 20042 | clean.data$JUDGQY == 20043 | clean.data$JUDGQY == 20044 | 
clean.data$JUDGQY == 20051 | clean.data$JUDGQY == 20052 | clean.data$JUDGQY == 20053 | 
clean.data$JUDGQY == 20052), 1,0)

FLOOD.9th.v1 <- ifelse(clean.data$CIRCUIT==9 & (clean.data$JUDGQY == 20024 | 
clean.data$JUDGQY == 20031 | clean.data$JUDGQY == 20032 | clean.data$JUDGQY == 20033 | 
clean.data$JUDGQY == 20034 | clean.data$JUDGQY == 20041 | clean.data$JUDGQY == 20042 | 
clean.data$JUDGQY == 20043 | clean.data$JUDGQY == 20044 | clean.data$JUDGQY == 20051 | 
clean.data$JUDGQY == 20052 | clean.data$JUDGQY == 20053 | clean.data$JUDGQY == 20052), 1,0)

FLOOD.9th.v2 <- ifelse(clean.data$CIRCUIT==9 & (clean.data$JUDGQY == 20032 | 
clean.data$JUDGQY == 20033 | clean.data$JUDGQY == 20034 | clean.data$JUDGQY == 20041 | 
clean.data$JUDGQY == 20042 | clean.data$JUDGQY == 20043 | clean.data$JUDGQY == 20044 | 
clean.data$JUDGQY == 20051 | clean.data$JUDGQY == 20052 | clean.data$JUDGQY == 20053 | 
clean.data$JUDGQY == 20052), 1,0)

##Creating dummies for the "transition" variables:

TRANS.2d.v1 <- ifelse(clean.data$CIRCUIT==2 & (clean.data$JUDGQY == 20022 | 
clean.data$JUDGQY == 20023),1,0)

TRANS.2d.v2 <- ifelse(clean.data$CIRCUIT==2 & (clean.data$JUDGQY == 20022 | 
clean.data$JUDGQY == 20023 | clean.data$JUDGQY == 20024 | clean.data$JUDGQY == 20031),1,0)

TRANS.9th.v1 <- ifelse(clean.data$CIRCUIT==9 & (clean.data$JUDGQY == 20022 | 
clean.data$JUDGQY == 20023),1,0)

TRANS.9th.v2 <- ifelse(clean.data$CIRCUIT==9 & (clean.data$JUDGQY == 20022 | 
clean.data$JUDGQY == 20023 | clean.data$JUDGQY == 20024 | clean.data$JUDGQY == 20031),1,0)


##Creating the "trend" and "change" variables:

##First, add a serial number for each quarter from 1:32:
 
Q.No1 <- ifelse(clean.data$JUDGQY==19974,1,clean.data$JUDGQY)
Q.No2 <- ifelse(clean.data$JUDGQY==19981,2, Q.No1)
Q.No3 <- ifelse(clean.data$JUDGQY==19982,3, Q.No2)
Q.No4 <- ifelse(clean.data$JUDGQY==19983,4, Q.No3)
Q.No5 <- ifelse(clean.data$JUDGQY==19984,5, Q.No4)
Q.No6 <- ifelse(clean.data$JUDGQY==19991,6, Q.No5)
Q.No7 <- ifelse(clean.data$JUDGQY==19992,7, Q.No6)
Q.No8 <- ifelse(clean.data$JUDGQY==19993,8, Q.No7)
Q.No9 <- ifelse(clean.data$JUDGQY==19994,9, Q.No8)
Q.No10 <- ifelse(clean.data$JUDGQY==20001,10, Q.No9)
Q.No11 <- ifelse(clean.data$JUDGQY==20002,11, Q.No10)
Q.No12 <- ifelse(clean.data$JUDGQY==20003,12, Q.No11)
Q.No13 <- ifelse(clean.data$JUDGQY==20004,13, Q.No12)
Q.No14 <- ifelse(clean.data$JUDGQY==20011,14, Q.No13)
Q.No15 <- ifelse(clean.data$JUDGQY==20012,15, Q.No14)
Q.No16 <- ifelse(clean.data$JUDGQY==20013,16, Q.No15)
Q.No17 <- ifelse(clean.data$JUDGQY==20014,17, Q.No16)
Q.No18 <- ifelse(clean.data$JUDGQY==20021,18, Q.No17)
Q.No19 <- ifelse(clean.data$JUDGQY==20022,19, Q.No18)
Q.No20 <- ifelse(clean.data$JUDGQY==20023,20, Q.No19)
Q.No21 <- ifelse(clean.data$JUDGQY==20024,21, Q.No20)
Q.No22 <- ifelse(clean.data$JUDGQY==20031,22, Q.No21)
Q.No23 <- ifelse(clean.data$JUDGQY==20032,23, Q.No22)
Q.No24 <- ifelse(clean.data$JUDGQY==20033,24, Q.No23)
Q.No25 <- ifelse(clean.data$JUDGQY==20034,25, Q.No24)
Q.No26 <- ifelse(clean.data$JUDGQY==20041,26, Q.No25)
Q.No27 <- ifelse(clean.data$JUDGQY==20042,27, Q.No26)
Q.No28 <- ifelse(clean.data$JUDGQY==20043,28, Q.No27)
Q.No29 <- ifelse(clean.data$JUDGQY==20044,29, Q.No28)
Q.No30 <- ifelse(clean.data$JUDGQY==20051,30, Q.No29)
Q.No31 <- ifelse(clean.data$JUDGQY==20052,31, Q.No30)
Q.No32 <- ifelse(clean.data$JUDGQY==20053,32, Q.No31)
Q.No <- Q.No32

clean.data.2 <- cbind(clean.data, Q.No)

#Trend variables:

TREND.2d <- ifelse(clean.data$CIRCUIT == 2, clean.data.2$Q.No, 0)

TREND.9th <- ifelse(clean.data$CIRCUIT == 9, clean.data.2$Q.No, 0)

#Change variables:

CHANGEt.2d.v1 <- ifelse(clean.data.2$CIRCUIT == 2 & clean.data.2$Q.No > 17 & 
clean.data.2$Q.No < 21, clean.data.2$Q.No - 18,0)

CHANGEf.2d.v1 <- ifelse(clean.data.2$CIRCUIT == 2 & clean.data.2$Q.No > 20, 
clean.data.2$Q.No - 20,0)

CHANGEt.2d.v2 <- ifelse(clean.data.2$CIRCUIT == 2 & clean.data.2$Q.No > 17 & 
clean.data.2$Q.No < 23, clean.data.2$Q.No - 18,0)

CHANGEf.2d.v2 <- ifelse(clean.data.2$CIRCUIT == 2 & clean.data.2$Q.No > 22, 
clean.data.2$Q.No - 20,0)

CHANGEt.9th.v1 <- ifelse(clean.data.2$CIRCUIT == 9 & clean.data.2$Q.No > 17 & 
clean.data.2$Q.No < 21, clean.data.2$Q.No - 18,0)

CHANGEf.9th.v1 <- ifelse(clean.data.2$CIRCUIT == 9 & clean.data.2$Q.No > 20, 
clean.data.2$Q.No - 20,0)

CHANGEt.9th.v2 <- ifelse(clean.data.2$CIRCUIT == 9 & clean.data.2$Q.No > 17 & 
clean.data.2$Q.No < 23, clean.data.2$Q.No - 18,0)

CHANGEf.9th.v2 <- ifelse(clean.data.2$CIRCUIT == 9 & clean.data.2$Q.No > 22, 
clean.data.2$Q.No - 20,0)

##adding the vacancy dummy(second circuit, until the end of 1998)##

VACANCY <- ifelse(clean.data$CIRCUIT == 2 & (clean.data$JUDGQY == 19974 
| clean.data$JUDGQY == 19981 | clean.data$JUDGQY == 19982 | clean.data$JUDGQY == 19983 |
clean.data$JUDGQY == 19984), 1, 0)

##Adding JUDGQYCIRCUIT column as an ID:

clean.data$JUDGQYCIRCUIT <- as.numeric(paste(clean.data$JUDGQY,clean.data$CIRCUIT,sep=""))

##Adding Political affiliation data:

GOP.data <- read.csv("GOP-2.csv")

GOP.data$JUDGQYCIRCUIT <- as.numeric(paste(GOP.data$quarter,GOP.data$circuit,sep=""))

clean.data$GOP <- c(rep(0,nrow(clean.data)))

temp1 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[1], GOP.data$GOP[1],clean.data$GOP)
temp2 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[2], GOP.data$GOP[2],temp1)
temp3 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[3], GOP.data$GOP[3],temp2)
temp4 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[4], GOP.data$GOP[4],temp3)
temp5 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[5], GOP.data$GOP[5],temp4)
temp6 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[6], GOP.data$GOP[6],temp5)
temp7 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[7], GOP.data$GOP[7],temp6)
temp8 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[8], GOP.data$GOP[8],temp7)
temp9 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[9], GOP.data$GOP[9],temp8)
temp10 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[10], GOP.data$GOP[10],temp9)
temp11 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[11], GOP.data$GOP[11],temp10)
temp12 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[12], GOP.data$GOP[12],temp11)
temp13 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[13], GOP.data$GOP[13],temp12)
temp14 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[14], GOP.data$GOP[14],temp13)
temp15 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[15], GOP.data$GOP[15],temp14)
temp16 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[16], GOP.data$GOP[16],temp15)
temp17 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[17], GOP.data$GOP[17],temp16)
temp18 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[18], GOP.data$GOP[18],temp17)
temp19 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[19], GOP.data$GOP[19],temp18)
temp20 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[20], GOP.data$GOP[20],temp19)
temp21 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[21], GOP.data$GOP[21],temp20)
temp22 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[22], GOP.data$GOP[22],temp21)
temp23 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[23], GOP.data$GOP[23],temp22)
temp24 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[24], GOP.data$GOP[24],temp23)
temp25 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[25], GOP.data$GOP[25],temp24)
temp26 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[26], GOP.data$GOP[26],temp25)
temp27 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[27], GOP.data$GOP[27],temp26)
temp28 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[28], GOP.data$GOP[28],temp27)
temp29 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[29], GOP.data$GOP[29],temp28)
temp30 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[30], GOP.data$GOP[30],temp29)
temp31 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[31], GOP.data$GOP[31],temp30)
temp32 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[32], GOP.data$GOP[32],temp31)
temp33 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[33], GOP.data$GOP[33],temp32)
temp34 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[34], GOP.data$GOP[34],temp33)
temp35 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[35], GOP.data$GOP[35],temp34)
temp36 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[36], GOP.data$GOP[36],temp35)
temp37 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[37], GOP.data$GOP[37],temp36)
temp38 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[38], GOP.data$GOP[38],temp37)
temp39 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[39], GOP.data$GOP[39],temp38)
temp40 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[40], GOP.data$GOP[40],temp39)
temp41 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[41], GOP.data$GOP[41],temp40)
temp42 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[42], GOP.data$GOP[42],temp41)
temp43 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[43], GOP.data$GOP[43],temp42)
temp44 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[44], GOP.data$GOP[44],temp43)
temp45 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[45], GOP.data$GOP[45],temp44)
temp46 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[46], GOP.data$GOP[46],temp45)
temp47 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[47], GOP.data$GOP[47],temp46)
temp48 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[48], GOP.data$GOP[48],temp47)
temp49 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[49], GOP.data$GOP[49],temp48)
temp50 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[50], GOP.data$GOP[50],temp49)
temp51 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[51], GOP.data$GOP[51],temp50)
temp52 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[52], GOP.data$GOP[52],temp51)
temp53 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[53], GOP.data$GOP[53],temp52)
temp54 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[54], GOP.data$GOP[54],temp53)
temp55 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[55], GOP.data$GOP[55],temp54)
temp56 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[56], GOP.data$GOP[56],temp55)
temp57 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[57], GOP.data$GOP[57],temp56)
temp58 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[58], GOP.data$GOP[58],temp57)
temp59 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[59], GOP.data$GOP[59],temp58)
temp60 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[60], GOP.data$GOP[60],temp59)
temp61 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[61], GOP.data$GOP[61],temp60)
temp62 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[62], GOP.data$GOP[62],temp61)
temp63 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[63], GOP.data$GOP[63],temp62)
temp64 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[64], GOP.data$GOP[64],temp63)
temp65 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[65], GOP.data$GOP[65],temp64)
temp66 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[66], GOP.data$GOP[66],temp65)
temp67 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[67], GOP.data$GOP[67],temp66)
temp68 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[68], GOP.data$GOP[68],temp67)
temp69 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[69], GOP.data$GOP[69],temp68)
temp70 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[70], GOP.data$GOP[70],temp69)
temp71 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[71], GOP.data$GOP[71],temp70)
temp72 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[72], GOP.data$GOP[72],temp71)
temp73 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[73], GOP.data$GOP[73],temp72)
temp74 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[74], GOP.data$GOP[74],temp73)
temp75 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[75], GOP.data$GOP[75],temp74)
temp76 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[76], GOP.data$GOP[76],temp75)
temp77 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[77], GOP.data$GOP[77],temp76)
temp78 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[78], GOP.data$GOP[78],temp77)
temp79 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[79], GOP.data$GOP[79],temp78)
temp80 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[80], GOP.data$GOP[80],temp79)
temp81 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[81], GOP.data$GOP[81],temp80)
temp82 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[82], GOP.data$GOP[82],temp81)
temp83 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[83], GOP.data$GOP[83],temp82)
temp84 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[84], GOP.data$GOP[84],temp83)
temp85 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[85], GOP.data$GOP[85],temp84)
temp86 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[86], GOP.data$GOP[86],temp85)
temp87 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[87], GOP.data$GOP[87],temp86)
temp88 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[88], GOP.data$GOP[88],temp87)
temp89 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[89], GOP.data$GOP[89],temp88)
temp90 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[90], GOP.data$GOP[90],temp89)
temp91 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[91], GOP.data$GOP[91],temp90)
temp92 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[92], GOP.data$GOP[92],temp91)
temp93 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[93], GOP.data$GOP[93],temp92)
temp94 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[94], GOP.data$GOP[94],temp93)
temp95 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[95], GOP.data$GOP[95],temp94)
temp96 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[96], GOP.data$GOP[96],temp95)
temp97 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[97], GOP.data$GOP[97],temp96)
temp98 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[98], GOP.data$GOP[98],temp97)
temp99 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[99], GOP.data$GOP[99],temp98)
temp100 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[100], GOP.data$GOP[100],temp99)
temp101 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[101], GOP.data$GOP[101],temp100)
temp102 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[102], GOP.data$GOP[102],temp101)
temp103 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[103], GOP.data$GOP[103],temp102)
temp104 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[104], GOP.data$GOP[104],temp103)
temp105 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[105], GOP.data$GOP[105],temp104)
temp106 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[106], GOP.data$GOP[106],temp105)
temp107 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[107], GOP.data$GOP[107],temp106)
temp108 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[108], GOP.data$GOP[108],temp107)
temp109 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[109], GOP.data$GOP[109],temp108)
temp110 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[110], GOP.data$GOP[110],temp109)
temp111 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[111], GOP.data$GOP[111],temp110)
temp112 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[112], GOP.data$GOP[112],temp111)
temp113 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[113], GOP.data$GOP[113],temp112)
temp114 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[114], GOP.data$GOP[114],temp113)
temp115 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[115], GOP.data$GOP[115],temp114)
temp116 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[116], GOP.data$GOP[116],temp115)
temp117 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[117], GOP.data$GOP[117],temp116)
temp118 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[118], GOP.data$GOP[118],temp117)
temp119 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[119], GOP.data$GOP[119],temp118)
temp120 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[120], GOP.data$GOP[120],temp119)
temp121 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[121], GOP.data$GOP[121],temp120)
temp122 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[122], GOP.data$GOP[122],temp121)
temp123 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[123], GOP.data$GOP[123],temp122)
temp124 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[124], GOP.data$GOP[124],temp123)
temp125 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[125], GOP.data$GOP[125],temp124)
temp126 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[126], GOP.data$GOP[126],temp125)
temp127 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[127], GOP.data$GOP[127],temp126)
temp128 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[128], GOP.data$GOP[128],temp127)
temp129 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[129], GOP.data$GOP[129],temp128)
temp130 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[130], GOP.data$GOP[130],temp129)
temp131 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[131], GOP.data$GOP[131],temp130)
temp132 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[132], GOP.data$GOP[132],temp131)
temp133 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[133], GOP.data$GOP[133],temp132)
temp134 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[134], GOP.data$GOP[134],temp133)
temp135 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[135], GOP.data$GOP[135],temp134)
temp136 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[136], GOP.data$GOP[136],temp135)
temp137 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[137], GOP.data$GOP[137],temp136)
temp138 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[138], GOP.data$GOP[138],temp137)
temp139 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[139], GOP.data$GOP[139],temp138)
temp140 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[140], GOP.data$GOP[140],temp139)
temp141 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[141], GOP.data$GOP[141],temp140)
temp142 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[142], GOP.data$GOP[142],temp141)
temp143 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[143], GOP.data$GOP[143],temp142)
temp144 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[144], GOP.data$GOP[144],temp143)
temp145 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[145], GOP.data$GOP[145],temp144)
temp146 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[146], GOP.data$GOP[146],temp145)
temp147 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[147], GOP.data$GOP[147],temp146)
temp148 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[148], GOP.data$GOP[148],temp147)
temp149 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[149], GOP.data$GOP[149],temp148)
temp150 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[150], GOP.data$GOP[150],temp149)
temp151 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[151], GOP.data$GOP[151],temp150)
temp152 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[152], GOP.data$GOP[152],temp151)
temp153 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[153], GOP.data$GOP[153],temp152)
temp154 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[154], GOP.data$GOP[154],temp153)
temp155 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[155], GOP.data$GOP[155],temp154)
temp156 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[156], GOP.data$GOP[156],temp155)
temp157 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[157], GOP.data$GOP[157],temp156)
temp158 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[158], GOP.data$GOP[158],temp157)
temp159 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[159], GOP.data$GOP[159],temp158)
temp160 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[160], GOP.data$GOP[160],temp159)
temp161 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[161], GOP.data$GOP[161],temp160)
temp162 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[162], GOP.data$GOP[162],temp161)
temp163 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[163], GOP.data$GOP[163],temp162)
temp164 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[164], GOP.data$GOP[164],temp163)
temp165 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[165], GOP.data$GOP[165],temp164)
temp166 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[166], GOP.data$GOP[166],temp165)
temp167 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[167], GOP.data$GOP[167],temp166)
temp168 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[168], GOP.data$GOP[168],temp167)
temp169 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[169], GOP.data$GOP[169],temp168)
temp170 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[170], GOP.data$GOP[170],temp169)
temp171 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[171], GOP.data$GOP[171],temp170)
temp172 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[172], GOP.data$GOP[172],temp171)
temp173 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[173], GOP.data$GOP[173],temp172)
temp174 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[174], GOP.data$GOP[174],temp173)
temp175 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[175], GOP.data$GOP[175],temp174)
temp176 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[176], GOP.data$GOP[176],temp175)
temp177 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[177], GOP.data$GOP[177],temp176)
temp178 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[178], GOP.data$GOP[178],temp177)
temp179 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[179], GOP.data$GOP[179],temp178)
temp180 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[180], GOP.data$GOP[180],temp179)
temp181 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[181], GOP.data$GOP[181],temp180)
temp182 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[182], GOP.data$GOP[182],temp181)
temp183 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[183], GOP.data$GOP[183],temp182)
temp184 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[184], GOP.data$GOP[184],temp183)
temp185 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[185], GOP.data$GOP[185],temp184)
temp186 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[186], GOP.data$GOP[186],temp185)
temp187 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[187], GOP.data$GOP[187],temp186)
temp188 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[188], GOP.data$GOP[188],temp187)
temp189 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[189], GOP.data$GOP[189],temp188)
temp190 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[190], GOP.data$GOP[190],temp189)
temp191 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[191], GOP.data$GOP[191],temp190)
temp192 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[192], GOP.data$GOP[192],temp191)
temp193 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[193], GOP.data$GOP[193],temp192)
temp194 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[194], GOP.data$GOP[194],temp193)
temp195 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[195], GOP.data$GOP[195],temp194)
temp196 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[196], GOP.data$GOP[196],temp195)
temp197 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[197], GOP.data$GOP[197],temp196)
temp198 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[198], GOP.data$GOP[198],temp197)
temp199 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[199], GOP.data$GOP[199],temp198)
temp200 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[200], GOP.data$GOP[200],temp199)
temp201 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[201], GOP.data$GOP[201],temp200)
temp202 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[202], GOP.data$GOP[202],temp201)
temp203 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[203], GOP.data$GOP[203],temp202)
temp204 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[204], GOP.data$GOP[204],temp203)
temp205 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[205], GOP.data$GOP[205],temp204)
temp206 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[206], GOP.data$GOP[206],temp205)
temp207 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[207], GOP.data$GOP[207],temp206)
temp208 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[208], GOP.data$GOP[208],temp207)
temp209 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[209], GOP.data$GOP[209],temp208)
temp210 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[210], GOP.data$GOP[210],temp209)
temp211 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[211], GOP.data$GOP[211],temp210)
temp212 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[212], GOP.data$GOP[212],temp211)
temp213 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[213], GOP.data$GOP[213],temp212)
temp214 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[214], GOP.data$GOP[214],temp213)
temp215 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[215], GOP.data$GOP[215],temp214)
temp216 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[216], GOP.data$GOP[216],temp215)
temp217 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[217], GOP.data$GOP[217],temp216)
temp218 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[218], GOP.data$GOP[218],temp217)
temp219 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[219], GOP.data$GOP[219],temp218)
temp220 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[220], GOP.data$GOP[220],temp219)
temp221 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[221], GOP.data$GOP[221],temp220)
temp222 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[222], GOP.data$GOP[222],temp221)
temp223 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[223], GOP.data$GOP[223],temp222)
temp224 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[224], GOP.data$GOP[224],temp223)
temp225 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[225], GOP.data$GOP[225],temp224)
temp226 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[226], GOP.data$GOP[226],temp225)
temp227 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[227], GOP.data$GOP[227],temp226)
temp228 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[228], GOP.data$GOP[228],temp227)
temp229 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[229], GOP.data$GOP[229],temp228)
temp230 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[230], GOP.data$GOP[230],temp229)
temp231 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[231], GOP.data$GOP[231],temp230)
temp232 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[232], GOP.data$GOP[232],temp231)
temp233 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[233], GOP.data$GOP[233],temp232)
temp234 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[234], GOP.data$GOP[234],temp233)
temp235 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[235], GOP.data$GOP[235],temp234)
temp236 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[236], GOP.data$GOP[236],temp235)
temp237 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[237], GOP.data$GOP[237],temp236)
temp238 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[238], GOP.data$GOP[238],temp237)
temp239 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[239], GOP.data$GOP[239],temp238)
temp240 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[240], GOP.data$GOP[240],temp239)
temp241 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[241], GOP.data$GOP[241],temp240)
temp242 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[242], GOP.data$GOP[242],temp241)
temp243 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[243], GOP.data$GOP[243],temp242)
temp244 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[244], GOP.data$GOP[244],temp243)
temp245 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[245], GOP.data$GOP[245],temp244)
temp246 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[246], GOP.data$GOP[246],temp245)
temp247 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[247], GOP.data$GOP[247],temp246)
temp248 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[248], GOP.data$GOP[248],temp247)
temp249 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[249], GOP.data$GOP[249],temp248)
temp250 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[250], GOP.data$GOP[250],temp249)
temp251 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[251], GOP.data$GOP[251],temp250)
temp252 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[252], GOP.data$GOP[252],temp251)
temp253 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[253], GOP.data$GOP[253],temp252)
temp254 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[254], GOP.data$GOP[254],temp253)
temp255 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[255], GOP.data$GOP[255],temp254)
temp256 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[256], GOP.data$GOP[256],temp255)
temp257 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[257], GOP.data$GOP[257],temp256)
temp258 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[258], GOP.data$GOP[258],temp257)
temp259 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[259], GOP.data$GOP[259],temp258)
temp260 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[260], GOP.data$GOP[260],temp259)
temp261 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[261], GOP.data$GOP[261],temp260)
temp262 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[262], GOP.data$GOP[262],temp261)
temp263 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[263], GOP.data$GOP[263],temp262)
temp264 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[264], GOP.data$GOP[264],temp263)
temp265 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[265], GOP.data$GOP[265],temp264)
temp266 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[266], GOP.data$GOP[266],temp265)
temp267 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[267], GOP.data$GOP[267],temp266)
temp268 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[268], GOP.data$GOP[268],temp267)
temp269 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[269], GOP.data$GOP[269],temp268)
temp270 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[270], GOP.data$GOP[270],temp269)
temp271 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[271], GOP.data$GOP[271],temp270)
temp272 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[272], GOP.data$GOP[272],temp271)
temp273 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[273], GOP.data$GOP[273],temp272)
temp274 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[274], GOP.data$GOP[274],temp273)
temp275 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[275], GOP.data$GOP[275],temp274)
temp276 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[276], GOP.data$GOP[276],temp275)
temp277 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[277], GOP.data$GOP[277],temp276)
temp278 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[278], GOP.data$GOP[278],temp277)
temp279 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[279], GOP.data$GOP[279],temp278)
temp280 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[280], GOP.data$GOP[280],temp279)
temp281 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[281], GOP.data$GOP[281],temp280)
temp282 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[282], GOP.data$GOP[282],temp281)
temp283 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[283], GOP.data$GOP[283],temp282)
temp284 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[284], GOP.data$GOP[284],temp283)
temp285 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[285], GOP.data$GOP[285],temp284)
temp286 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[286], GOP.data$GOP[286],temp285)
temp287 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[287], GOP.data$GOP[287],temp286)
temp288 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[288], GOP.data$GOP[288],temp287)
temp289 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[289], GOP.data$GOP[289],temp288)
temp290 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[290], GOP.data$GOP[290],temp289)
temp291 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[291], GOP.data$GOP[291],temp290)
temp292 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[292], GOP.data$GOP[292],temp291)
temp293 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[293], GOP.data$GOP[293],temp292)
temp294 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[294], GOP.data$GOP[294],temp293)
temp295 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[295], GOP.data$GOP[295],temp294)
temp296 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[296], GOP.data$GOP[296],temp295)
temp297 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[297], GOP.data$GOP[297],temp296)
temp298 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[298], GOP.data$GOP[298],temp297)
temp299 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[299], GOP.data$GOP[299],temp298)
temp300 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[300], GOP.data$GOP[300],temp299)
temp301 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[301], GOP.data$GOP[301],temp300)
temp302 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[302], GOP.data$GOP[302],temp301)
temp303 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[303], GOP.data$GOP[303],temp302)
temp304 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[304], GOP.data$GOP[304],temp303)
temp305 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[305], GOP.data$GOP[305],temp304)
temp306 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[306], GOP.data$GOP[306],temp305)
temp307 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[307], GOP.data$GOP[307],temp306)
temp308 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[308], GOP.data$GOP[308],temp307)
temp309 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[309], GOP.data$GOP[309],temp308)
temp310 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[310], GOP.data$GOP[310],temp309)
temp311 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[311], GOP.data$GOP[311],temp310)
temp312 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[312], GOP.data$GOP[312],temp311)
temp313 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[313], GOP.data$GOP[313],temp312)
temp314 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[314], GOP.data$GOP[314],temp313)
temp315 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[315], GOP.data$GOP[315],temp314)
temp316 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[316], GOP.data$GOP[316],temp315)
temp317 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[317], GOP.data$GOP[317],temp316)
temp318 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[318], GOP.data$GOP[318],temp317)
temp319 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[319], GOP.data$GOP[319],temp318)
temp320 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[320], GOP.data$GOP[320],temp319)
temp321 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[321], GOP.data$GOP[321],temp320)
temp322 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[322], GOP.data$GOP[322],temp321)
temp323 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[323], GOP.data$GOP[323],temp322)
temp324 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[324], GOP.data$GOP[324],temp323)
temp325 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[325], GOP.data$GOP[325],temp324)
temp326 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[326], GOP.data$GOP[326],temp325)
temp327 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[327], GOP.data$GOP[327],temp326)
temp328 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[328], GOP.data$GOP[328],temp327)
temp329 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[329], GOP.data$GOP[329],temp328)
temp330 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[330], GOP.data$GOP[330],temp329)
temp331 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[331], GOP.data$GOP[331],temp330)
temp332 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[332], GOP.data$GOP[332],temp331)
temp333 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[333], GOP.data$GOP[333],temp332)
temp334 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[334], GOP.data$GOP[334],temp333)
temp335 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[335], GOP.data$GOP[335],temp334)
temp336 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[336], GOP.data$GOP[336],temp335)
temp337 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[337], GOP.data$GOP[337],temp336)
temp338 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[338], GOP.data$GOP[338],temp337)
temp339 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[339], GOP.data$GOP[339],temp338)
temp340 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[340], GOP.data$GOP[340],temp339)
temp341 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[341], GOP.data$GOP[341],temp340)
temp342 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[342], GOP.data$GOP[342],temp341)
temp343 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[343], GOP.data$GOP[343],temp342)
temp344 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[344], GOP.data$GOP[344],temp343)
temp345 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[345], GOP.data$GOP[345],temp344)
temp346 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[346], GOP.data$GOP[346],temp345)
temp347 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[347], GOP.data$GOP[347],temp346)
temp348 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[348], GOP.data$GOP[348],temp347)
temp349 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[349], GOP.data$GOP[349],temp348)
temp350 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[350], GOP.data$GOP[350],temp349)
temp351 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[351], GOP.data$GOP[351],temp350)
temp352 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[352], GOP.data$GOP[352],temp351)

clean.data$GOP <- temp352

clean.data$DCTGOP <- c(rep(0,nrow(clean.data)))

temp1 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[1], GOP.data$DCTGOP[1],clean.data$DCTGOP)
temp2 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[2], GOP.data$DCTGOP[2],temp1)
temp3 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[3], GOP.data$DCTGOP[3],temp2)
temp4 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[4], GOP.data$DCTGOP[4],temp3)
temp5 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[5], GOP.data$DCTGOP[5],temp4)
temp6 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[6], GOP.data$DCTGOP[6],temp5)
temp7 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[7], GOP.data$DCTGOP[7],temp6)
temp8 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[8], GOP.data$DCTGOP[8],temp7)
temp9 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[9], GOP.data$DCTGOP[9],temp8)
temp10 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[10], GOP.data$DCTGOP[10],temp9)
temp11 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[11], GOP.data$DCTGOP[11],temp10)
temp12 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[12], GOP.data$DCTGOP[12],temp11)
temp13 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[13], GOP.data$DCTGOP[13],temp12)
temp14 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[14], GOP.data$DCTGOP[14],temp13)
temp15 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[15], GOP.data$DCTGOP[15],temp14)
temp16 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[16], GOP.data$DCTGOP[16],temp15)
temp17 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[17], GOP.data$DCTGOP[17],temp16)
temp18 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[18], GOP.data$DCTGOP[18],temp17)
temp19 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[19], GOP.data$DCTGOP[19],temp18)
temp20 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[20], GOP.data$DCTGOP[20],temp19)
temp21 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[21], GOP.data$DCTGOP[21],temp20)
temp22 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[22], GOP.data$DCTGOP[22],temp21)
temp23 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[23], GOP.data$DCTGOP[23],temp22)
temp24 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[24], GOP.data$DCTGOP[24],temp23)
temp25 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[25], GOP.data$DCTGOP[25],temp24)
temp26 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[26], GOP.data$DCTGOP[26],temp25)
temp27 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[27], GOP.data$DCTGOP[27],temp26)
temp28 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[28], GOP.data$DCTGOP[28],temp27)
temp29 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[29], GOP.data$DCTGOP[29],temp28)
temp30 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[30], GOP.data$DCTGOP[30],temp29)
temp31 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[31], GOP.data$DCTGOP[31],temp30)
temp32 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[32], GOP.data$DCTGOP[32],temp31)
temp33 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[33], GOP.data$DCTGOP[33],temp32)
temp34 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[34], GOP.data$DCTGOP[34],temp33)
temp35 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[35], GOP.data$DCTGOP[35],temp34)
temp36 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[36], GOP.data$DCTGOP[36],temp35)
temp37 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[37], GOP.data$DCTGOP[37],temp36)
temp38 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[38], GOP.data$DCTGOP[38],temp37)
temp39 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[39], GOP.data$DCTGOP[39],temp38)
temp40 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[40], GOP.data$DCTGOP[40],temp39)
temp41 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[41], GOP.data$DCTGOP[41],temp40)
temp42 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[42], GOP.data$DCTGOP[42],temp41)
temp43 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[43], GOP.data$DCTGOP[43],temp42)
temp44 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[44], GOP.data$DCTGOP[44],temp43)
temp45 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[45], GOP.data$DCTGOP[45],temp44)
temp46 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[46], GOP.data$DCTGOP[46],temp45)
temp47 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[47], GOP.data$DCTGOP[47],temp46)
temp48 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[48], GOP.data$DCTGOP[48],temp47)
temp49 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[49], GOP.data$DCTGOP[49],temp48)
temp50 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[50], GOP.data$DCTGOP[50],temp49)
temp51 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[51], GOP.data$DCTGOP[51],temp50)
temp52 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[52], GOP.data$DCTGOP[52],temp51)
temp53 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[53], GOP.data$DCTGOP[53],temp52)
temp54 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[54], GOP.data$DCTGOP[54],temp53)
temp55 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[55], GOP.data$DCTGOP[55],temp54)
temp56 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[56], GOP.data$DCTGOP[56],temp55)
temp57 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[57], GOP.data$DCTGOP[57],temp56)
temp58 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[58], GOP.data$DCTGOP[58],temp57)
temp59 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[59], GOP.data$DCTGOP[59],temp58)
temp60 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[60], GOP.data$DCTGOP[60],temp59)
temp61 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[61], GOP.data$DCTGOP[61],temp60)
temp62 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[62], GOP.data$DCTGOP[62],temp61)
temp63 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[63], GOP.data$DCTGOP[63],temp62)
temp64 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[64], GOP.data$DCTGOP[64],temp63)
temp65 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[65], GOP.data$DCTGOP[65],temp64)
temp66 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[66], GOP.data$DCTGOP[66],temp65)
temp67 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[67], GOP.data$DCTGOP[67],temp66)
temp68 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[68], GOP.data$DCTGOP[68],temp67)
temp69 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[69], GOP.data$DCTGOP[69],temp68)
temp70 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[70], GOP.data$DCTGOP[70],temp69)
temp71 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[71], GOP.data$DCTGOP[71],temp70)
temp72 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[72], GOP.data$DCTGOP[72],temp71)
temp73 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[73], GOP.data$DCTGOP[73],temp72)
temp74 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[74], GOP.data$DCTGOP[74],temp73)
temp75 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[75], GOP.data$DCTGOP[75],temp74)
temp76 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[76], GOP.data$DCTGOP[76],temp75)
temp77 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[77], GOP.data$DCTGOP[77],temp76)
temp78 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[78], GOP.data$DCTGOP[78],temp77)
temp79 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[79], GOP.data$DCTGOP[79],temp78)
temp80 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[80], GOP.data$DCTGOP[80],temp79)
temp81 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[81], GOP.data$DCTGOP[81],temp80)
temp82 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[82], GOP.data$DCTGOP[82],temp81)
temp83 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[83], GOP.data$DCTGOP[83],temp82)
temp84 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[84], GOP.data$DCTGOP[84],temp83)
temp85 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[85], GOP.data$DCTGOP[85],temp84)
temp86 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[86], GOP.data$DCTGOP[86],temp85)
temp87 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[87], GOP.data$DCTGOP[87],temp86)
temp88 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[88], GOP.data$DCTGOP[88],temp87)
temp89 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[89], GOP.data$DCTGOP[89],temp88)
temp90 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[90], GOP.data$DCTGOP[90],temp89)
temp91 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[91], GOP.data$DCTGOP[91],temp90)
temp92 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[92], GOP.data$DCTGOP[92],temp91)
temp93 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[93], GOP.data$DCTGOP[93],temp92)
temp94 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[94], GOP.data$DCTGOP[94],temp93)
temp95 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[95], GOP.data$DCTGOP[95],temp94)
temp96 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[96], GOP.data$DCTGOP[96],temp95)
temp97 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[97], GOP.data$DCTGOP[97],temp96)
temp98 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[98], GOP.data$DCTGOP[98],temp97)
temp99 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[99], GOP.data$DCTGOP[99],temp98)
temp100 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[100], GOP.data$DCTGOP[100],temp99)
temp101 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[101], GOP.data$DCTGOP[101],temp100)
temp102 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[102], GOP.data$DCTGOP[102],temp101)
temp103 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[103], GOP.data$DCTGOP[103],temp102)
temp104 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[104], GOP.data$DCTGOP[104],temp103)
temp105 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[105], GOP.data$DCTGOP[105],temp104)
temp106 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[106], GOP.data$DCTGOP[106],temp105)
temp107 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[107], GOP.data$DCTGOP[107],temp106)
temp108 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[108], GOP.data$DCTGOP[108],temp107)
temp109 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[109], GOP.data$DCTGOP[109],temp108)
temp110 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[110], GOP.data$DCTGOP[110],temp109)
temp111 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[111], GOP.data$DCTGOP[111],temp110)
temp112 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[112], GOP.data$DCTGOP[112],temp111)
temp113 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[113], GOP.data$DCTGOP[113],temp112)
temp114 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[114], GOP.data$DCTGOP[114],temp113)
temp115 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[115], GOP.data$DCTGOP[115],temp114)
temp116 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[116], GOP.data$DCTGOP[116],temp115)
temp117 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[117], GOP.data$DCTGOP[117],temp116)
temp118 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[118], GOP.data$DCTGOP[118],temp117)
temp119 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[119], GOP.data$DCTGOP[119],temp118)
temp120 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[120], GOP.data$DCTGOP[120],temp119)
temp121 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[121], GOP.data$DCTGOP[121],temp120)
temp122 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[122], GOP.data$DCTGOP[122],temp121)
temp123 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[123], GOP.data$DCTGOP[123],temp122)
temp124 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[124], GOP.data$DCTGOP[124],temp123)
temp125 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[125], GOP.data$DCTGOP[125],temp124)
temp126 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[126], GOP.data$DCTGOP[126],temp125)
temp127 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[127], GOP.data$DCTGOP[127],temp126)
temp128 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[128], GOP.data$DCTGOP[128],temp127)
temp129 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[129], GOP.data$DCTGOP[129],temp128)
temp130 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[130], GOP.data$DCTGOP[130],temp129)
temp131 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[131], GOP.data$DCTGOP[131],temp130)
temp132 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[132], GOP.data$DCTGOP[132],temp131)
temp133 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[133], GOP.data$DCTGOP[133],temp132)
temp134 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[134], GOP.data$DCTGOP[134],temp133)
temp135 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[135], GOP.data$DCTGOP[135],temp134)
temp136 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[136], GOP.data$DCTGOP[136],temp135)
temp137 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[137], GOP.data$DCTGOP[137],temp136)
temp138 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[138], GOP.data$DCTGOP[138],temp137)
temp139 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[139], GOP.data$DCTGOP[139],temp138)
temp140 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[140], GOP.data$DCTGOP[140],temp139)
temp141 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[141], GOP.data$DCTGOP[141],temp140)
temp142 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[142], GOP.data$DCTGOP[142],temp141)
temp143 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[143], GOP.data$DCTGOP[143],temp142)
temp144 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[144], GOP.data$DCTGOP[144],temp143)
temp145 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[145], GOP.data$DCTGOP[145],temp144)
temp146 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[146], GOP.data$DCTGOP[146],temp145)
temp147 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[147], GOP.data$DCTGOP[147],temp146)
temp148 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[148], GOP.data$DCTGOP[148],temp147)
temp149 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[149], GOP.data$DCTGOP[149],temp148)
temp150 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[150], GOP.data$DCTGOP[150],temp149)
temp151 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[151], GOP.data$DCTGOP[151],temp150)
temp152 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[152], GOP.data$DCTGOP[152],temp151)
temp153 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[153], GOP.data$DCTGOP[153],temp152)
temp154 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[154], GOP.data$DCTGOP[154],temp153)
temp155 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[155], GOP.data$DCTGOP[155],temp154)
temp156 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[156], GOP.data$DCTGOP[156],temp155)
temp157 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[157], GOP.data$DCTGOP[157],temp156)
temp158 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[158], GOP.data$DCTGOP[158],temp157)
temp159 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[159], GOP.data$DCTGOP[159],temp158)
temp160 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[160], GOP.data$DCTGOP[160],temp159)
temp161 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[161], GOP.data$DCTGOP[161],temp160)
temp162 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[162], GOP.data$DCTGOP[162],temp161)
temp163 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[163], GOP.data$DCTGOP[163],temp162)
temp164 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[164], GOP.data$DCTGOP[164],temp163)
temp165 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[165], GOP.data$DCTGOP[165],temp164)
temp166 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[166], GOP.data$DCTGOP[166],temp165)
temp167 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[167], GOP.data$DCTGOP[167],temp166)
temp168 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[168], GOP.data$DCTGOP[168],temp167)
temp169 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[169], GOP.data$DCTGOP[169],temp168)
temp170 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[170], GOP.data$DCTGOP[170],temp169)
temp171 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[171], GOP.data$DCTGOP[171],temp170)
temp172 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[172], GOP.data$DCTGOP[172],temp171)
temp173 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[173], GOP.data$DCTGOP[173],temp172)
temp174 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[174], GOP.data$DCTGOP[174],temp173)
temp175 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[175], GOP.data$DCTGOP[175],temp174)
temp176 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[176], GOP.data$DCTGOP[176],temp175)
temp177 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[177], GOP.data$DCTGOP[177],temp176)
temp178 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[178], GOP.data$DCTGOP[178],temp177)
temp179 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[179], GOP.data$DCTGOP[179],temp178)
temp180 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[180], GOP.data$DCTGOP[180],temp179)
temp181 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[181], GOP.data$DCTGOP[181],temp180)
temp182 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[182], GOP.data$DCTGOP[182],temp181)
temp183 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[183], GOP.data$DCTGOP[183],temp182)
temp184 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[184], GOP.data$DCTGOP[184],temp183)
temp185 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[185], GOP.data$DCTGOP[185],temp184)
temp186 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[186], GOP.data$DCTGOP[186],temp185)
temp187 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[187], GOP.data$DCTGOP[187],temp186)
temp188 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[188], GOP.data$DCTGOP[188],temp187)
temp189 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[189], GOP.data$DCTGOP[189],temp188)
temp190 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[190], GOP.data$DCTGOP[190],temp189)
temp191 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[191], GOP.data$DCTGOP[191],temp190)
temp192 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[192], GOP.data$DCTGOP[192],temp191)
temp193 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[193], GOP.data$DCTGOP[193],temp192)
temp194 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[194], GOP.data$DCTGOP[194],temp193)
temp195 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[195], GOP.data$DCTGOP[195],temp194)
temp196 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[196], GOP.data$DCTGOP[196],temp195)
temp197 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[197], GOP.data$DCTGOP[197],temp196)
temp198 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[198], GOP.data$DCTGOP[198],temp197)
temp199 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[199], GOP.data$DCTGOP[199],temp198)
temp200 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[200], GOP.data$DCTGOP[200],temp199)
temp201 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[201], GOP.data$DCTGOP[201],temp200)
temp202 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[202], GOP.data$DCTGOP[202],temp201)
temp203 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[203], GOP.data$DCTGOP[203],temp202)
temp204 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[204], GOP.data$DCTGOP[204],temp203)
temp205 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[205], GOP.data$DCTGOP[205],temp204)
temp206 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[206], GOP.data$DCTGOP[206],temp205)
temp207 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[207], GOP.data$DCTGOP[207],temp206)
temp208 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[208], GOP.data$DCTGOP[208],temp207)
temp209 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[209], GOP.data$DCTGOP[209],temp208)
temp210 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[210], GOP.data$DCTGOP[210],temp209)
temp211 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[211], GOP.data$DCTGOP[211],temp210)
temp212 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[212], GOP.data$DCTGOP[212],temp211)
temp213 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[213], GOP.data$DCTGOP[213],temp212)
temp214 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[214], GOP.data$DCTGOP[214],temp213)
temp215 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[215], GOP.data$DCTGOP[215],temp214)
temp216 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[216], GOP.data$DCTGOP[216],temp215)
temp217 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[217], GOP.data$DCTGOP[217],temp216)
temp218 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[218], GOP.data$DCTGOP[218],temp217)
temp219 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[219], GOP.data$DCTGOP[219],temp218)
temp220 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[220], GOP.data$DCTGOP[220],temp219)
temp221 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[221], GOP.data$DCTGOP[221],temp220)
temp222 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[222], GOP.data$DCTGOP[222],temp221)
temp223 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[223], GOP.data$DCTGOP[223],temp222)
temp224 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[224], GOP.data$DCTGOP[224],temp223)
temp225 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[225], GOP.data$DCTGOP[225],temp224)
temp226 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[226], GOP.data$DCTGOP[226],temp225)
temp227 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[227], GOP.data$DCTGOP[227],temp226)
temp228 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[228], GOP.data$DCTGOP[228],temp227)
temp229 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[229], GOP.data$DCTGOP[229],temp228)
temp230 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[230], GOP.data$DCTGOP[230],temp229)
temp231 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[231], GOP.data$DCTGOP[231],temp230)
temp232 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[232], GOP.data$DCTGOP[232],temp231)
temp233 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[233], GOP.data$DCTGOP[233],temp232)
temp234 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[234], GOP.data$DCTGOP[234],temp233)
temp235 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[235], GOP.data$DCTGOP[235],temp234)
temp236 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[236], GOP.data$DCTGOP[236],temp235)
temp237 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[237], GOP.data$DCTGOP[237],temp236)
temp238 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[238], GOP.data$DCTGOP[238],temp237)
temp239 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[239], GOP.data$DCTGOP[239],temp238)
temp240 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[240], GOP.data$DCTGOP[240],temp239)
temp241 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[241], GOP.data$DCTGOP[241],temp240)
temp242 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[242], GOP.data$DCTGOP[242],temp241)
temp243 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[243], GOP.data$DCTGOP[243],temp242)
temp244 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[244], GOP.data$DCTGOP[244],temp243)
temp245 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[245], GOP.data$DCTGOP[245],temp244)
temp246 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[246], GOP.data$DCTGOP[246],temp245)
temp247 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[247], GOP.data$DCTGOP[247],temp246)
temp248 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[248], GOP.data$DCTGOP[248],temp247)
temp249 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[249], GOP.data$DCTGOP[249],temp248)
temp250 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[250], GOP.data$DCTGOP[250],temp249)
temp251 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[251], GOP.data$DCTGOP[251],temp250)
temp252 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[252], GOP.data$DCTGOP[252],temp251)
temp253 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[253], GOP.data$DCTGOP[253],temp252)
temp254 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[254], GOP.data$DCTGOP[254],temp253)
temp255 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[255], GOP.data$DCTGOP[255],temp254)
temp256 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[256], GOP.data$DCTGOP[256],temp255)
temp257 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[257], GOP.data$DCTGOP[257],temp256)
temp258 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[258], GOP.data$DCTGOP[258],temp257)
temp259 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[259], GOP.data$DCTGOP[259],temp258)
temp260 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[260], GOP.data$DCTGOP[260],temp259)
temp261 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[261], GOP.data$DCTGOP[261],temp260)
temp262 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[262], GOP.data$DCTGOP[262],temp261)
temp263 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[263], GOP.data$DCTGOP[263],temp262)
temp264 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[264], GOP.data$DCTGOP[264],temp263)
temp265 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[265], GOP.data$DCTGOP[265],temp264)
temp266 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[266], GOP.data$DCTGOP[266],temp265)
temp267 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[267], GOP.data$DCTGOP[267],temp266)
temp268 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[268], GOP.data$DCTGOP[268],temp267)
temp269 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[269], GOP.data$DCTGOP[269],temp268)
temp270 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[270], GOP.data$DCTGOP[270],temp269)
temp271 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[271], GOP.data$DCTGOP[271],temp270)
temp272 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[272], GOP.data$DCTGOP[272],temp271)
temp273 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[273], GOP.data$DCTGOP[273],temp272)
temp274 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[274], GOP.data$DCTGOP[274],temp273)
temp275 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[275], GOP.data$DCTGOP[275],temp274)
temp276 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[276], GOP.data$DCTGOP[276],temp275)
temp277 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[277], GOP.data$DCTGOP[277],temp276)
temp278 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[278], GOP.data$DCTGOP[278],temp277)
temp279 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[279], GOP.data$DCTGOP[279],temp278)
temp280 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[280], GOP.data$DCTGOP[280],temp279)
temp281 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[281], GOP.data$DCTGOP[281],temp280)
temp282 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[282], GOP.data$DCTGOP[282],temp281)
temp283 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[283], GOP.data$DCTGOP[283],temp282)
temp284 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[284], GOP.data$DCTGOP[284],temp283)
temp285 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[285], GOP.data$DCTGOP[285],temp284)
temp286 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[286], GOP.data$DCTGOP[286],temp285)
temp287 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[287], GOP.data$DCTGOP[287],temp286)
temp288 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[288], GOP.data$DCTGOP[288],temp287)
temp289 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[289], GOP.data$DCTGOP[289],temp288)
temp290 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[290], GOP.data$DCTGOP[290],temp289)
temp291 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[291], GOP.data$DCTGOP[291],temp290)
temp292 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[292], GOP.data$DCTGOP[292],temp291)
temp293 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[293], GOP.data$DCTGOP[293],temp292)
temp294 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[294], GOP.data$DCTGOP[294],temp293)
temp295 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[295], GOP.data$DCTGOP[295],temp294)
temp296 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[296], GOP.data$DCTGOP[296],temp295)
temp297 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[297], GOP.data$DCTGOP[297],temp296)
temp298 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[298], GOP.data$DCTGOP[298],temp297)
temp299 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[299], GOP.data$DCTGOP[299],temp298)
temp300 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[300], GOP.data$DCTGOP[300],temp299)
temp301 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[301], GOP.data$DCTGOP[301],temp300)
temp302 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[302], GOP.data$DCTGOP[302],temp301)
temp303 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[303], GOP.data$DCTGOP[303],temp302)
temp304 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[304], GOP.data$DCTGOP[304],temp303)
temp305 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[305], GOP.data$DCTGOP[305],temp304)
temp306 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[306], GOP.data$DCTGOP[306],temp305)
temp307 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[307], GOP.data$DCTGOP[307],temp306)
temp308 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[308], GOP.data$DCTGOP[308],temp307)
temp309 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[309], GOP.data$DCTGOP[309],temp308)
temp310 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[310], GOP.data$DCTGOP[310],temp309)
temp311 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[311], GOP.data$DCTGOP[311],temp310)
temp312 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[312], GOP.data$DCTGOP[312],temp311)
temp313 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[313], GOP.data$DCTGOP[313],temp312)
temp314 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[314], GOP.data$DCTGOP[314],temp313)
temp315 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[315], GOP.data$DCTGOP[315],temp314)
temp316 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[316], GOP.data$DCTGOP[316],temp315)
temp317 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[317], GOP.data$DCTGOP[317],temp316)
temp318 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[318], GOP.data$DCTGOP[318],temp317)
temp319 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[319], GOP.data$DCTGOP[319],temp318)
temp320 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[320], GOP.data$DCTGOP[320],temp319)
temp321 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[321], GOP.data$DCTGOP[321],temp320)
temp322 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[322], GOP.data$DCTGOP[322],temp321)
temp323 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[323], GOP.data$DCTGOP[323],temp322)
temp324 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[324], GOP.data$DCTGOP[324],temp323)
temp325 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[325], GOP.data$DCTGOP[325],temp324)
temp326 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[326], GOP.data$DCTGOP[326],temp325)
temp327 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[327], GOP.data$DCTGOP[327],temp326)
temp328 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[328], GOP.data$DCTGOP[328],temp327)
temp329 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[329], GOP.data$DCTGOP[329],temp328)
temp330 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[330], GOP.data$DCTGOP[330],temp329)
temp331 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[331], GOP.data$DCTGOP[331],temp330)
temp332 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[332], GOP.data$DCTGOP[332],temp331)
temp333 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[333], GOP.data$DCTGOP[333],temp332)
temp334 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[334], GOP.data$DCTGOP[334],temp333)
temp335 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[335], GOP.data$DCTGOP[335],temp334)
temp336 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[336], GOP.data$DCTGOP[336],temp335)
temp337 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[337], GOP.data$DCTGOP[337],temp336)
temp338 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[338], GOP.data$DCTGOP[338],temp337)
temp339 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[339], GOP.data$DCTGOP[339],temp338)
temp340 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[340], GOP.data$DCTGOP[340],temp339)
temp341 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[341], GOP.data$DCTGOP[341],temp340)
temp342 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[342], GOP.data$DCTGOP[342],temp341)
temp343 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[343], GOP.data$DCTGOP[343],temp342)
temp344 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[344], GOP.data$DCTGOP[344],temp343)
temp345 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[345], GOP.data$DCTGOP[345],temp344)
temp346 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[346], GOP.data$DCTGOP[346],temp345)
temp347 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[347], GOP.data$DCTGOP[347],temp346)
temp348 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[348], GOP.data$DCTGOP[348],temp347)
temp349 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[349], GOP.data$DCTGOP[349],temp348)
temp350 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[350], GOP.data$DCTGOP[350],temp349)
temp351 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[351], GOP.data$DCTGOP[351],temp350)
temp352 <- ifelse(clean.data$JUDGQYCIRCUIT == GOP.data$JUDGQYCIRCUIT[352], GOP.data$DCTGOP[352],temp351)

clean.data$DCTGOP <- temp352


##Adding active judge data

ACTIVEJ.data <- read.csv("Active Judges-1.csv")

clean.data$ACTIVEJ <- c(rep(NA,nrow(clean.data)))

temp1 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1], ACTIVEJ.data$ACTIVEJ[1],clean.data$ACTIVEJ)
temp2 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[2], ACTIVEJ.data$ACTIVEJ[2],temp1)
temp3 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[3], ACTIVEJ.data$ACTIVEJ[3],temp2)
temp4 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[4], ACTIVEJ.data$ACTIVEJ[4],temp3)
temp5 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[5], ACTIVEJ.data$ACTIVEJ[5],temp4)
temp6 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[6], ACTIVEJ.data$ACTIVEJ[6],temp5)
temp7 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[7], ACTIVEJ.data$ACTIVEJ[7],temp6)
temp8 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[8], ACTIVEJ.data$ACTIVEJ[8],temp7)
temp9 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[9], ACTIVEJ.data$ACTIVEJ[9],temp8)
temp10 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[10], ACTIVEJ.data$ACTIVEJ[10],temp9)
temp11 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[11], ACTIVEJ.data$ACTIVEJ[11],temp10)
temp12 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[12], ACTIVEJ.data$ACTIVEJ[12],temp11)
temp13 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[13], ACTIVEJ.data$ACTIVEJ[13],temp12)
temp14 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[14], ACTIVEJ.data$ACTIVEJ[14],temp13)
temp15 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[15], ACTIVEJ.data$ACTIVEJ[15],temp14)
temp16 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[16], ACTIVEJ.data$ACTIVEJ[16],temp15)
temp17 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[17], ACTIVEJ.data$ACTIVEJ[17],temp16)
temp18 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[18], ACTIVEJ.data$ACTIVEJ[18],temp17)
temp19 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[19], ACTIVEJ.data$ACTIVEJ[19],temp18)
temp20 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[20], ACTIVEJ.data$ACTIVEJ[20],temp19)
temp21 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[21], ACTIVEJ.data$ACTIVEJ[21],temp20)
temp22 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[22], ACTIVEJ.data$ACTIVEJ[22],temp21)
temp23 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[23], ACTIVEJ.data$ACTIVEJ[23],temp22)
temp24 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[24], ACTIVEJ.data$ACTIVEJ[24],temp23)
temp25 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[25], ACTIVEJ.data$ACTIVEJ[25],temp24)
temp26 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[26], ACTIVEJ.data$ACTIVEJ[26],temp25)
temp27 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[27], ACTIVEJ.data$ACTIVEJ[27],temp26)
temp28 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[28], ACTIVEJ.data$ACTIVEJ[28],temp27)
temp29 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[29], ACTIVEJ.data$ACTIVEJ[29],temp28)
temp30 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[30], ACTIVEJ.data$ACTIVEJ[30],temp29)
temp31 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[31], ACTIVEJ.data$ACTIVEJ[31],temp30)
temp32 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[32], ACTIVEJ.data$ACTIVEJ[32],temp31)
temp33 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[33], ACTIVEJ.data$ACTIVEJ[33],temp32)
temp34 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[34], ACTIVEJ.data$ACTIVEJ[34],temp33)
temp35 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[35], ACTIVEJ.data$ACTIVEJ[35],temp34)
temp36 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[36], ACTIVEJ.data$ACTIVEJ[36],temp35)
temp37 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[37], ACTIVEJ.data$ACTIVEJ[37],temp36)
temp38 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[38], ACTIVEJ.data$ACTIVEJ[38],temp37)
temp39 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[39], ACTIVEJ.data$ACTIVEJ[39],temp38)
temp40 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[40], ACTIVEJ.data$ACTIVEJ[40],temp39)
temp41 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[41], ACTIVEJ.data$ACTIVEJ[41],temp40)
temp42 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[42], ACTIVEJ.data$ACTIVEJ[42],temp41)
temp43 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[43], ACTIVEJ.data$ACTIVEJ[43],temp42)
temp44 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[44], ACTIVEJ.data$ACTIVEJ[44],temp43)
temp45 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[45], ACTIVEJ.data$ACTIVEJ[45],temp44)
temp46 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[46], ACTIVEJ.data$ACTIVEJ[46],temp45)
temp47 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[47], ACTIVEJ.data$ACTIVEJ[47],temp46)
temp48 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[48], ACTIVEJ.data$ACTIVEJ[48],temp47)
temp49 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[49], ACTIVEJ.data$ACTIVEJ[49],temp48)
temp50 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[50], ACTIVEJ.data$ACTIVEJ[50],temp49)
temp51 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[51], ACTIVEJ.data$ACTIVEJ[51],temp50)
temp52 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[52], ACTIVEJ.data$ACTIVEJ[52],temp51)
temp53 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[53], ACTIVEJ.data$ACTIVEJ[53],temp52)
temp54 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[54], ACTIVEJ.data$ACTIVEJ[54],temp53)
temp55 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[55], ACTIVEJ.data$ACTIVEJ[55],temp54)
temp56 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[56], ACTIVEJ.data$ACTIVEJ[56],temp55)
temp57 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[57], ACTIVEJ.data$ACTIVEJ[57],temp56)
temp58 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[58], ACTIVEJ.data$ACTIVEJ[58],temp57)
temp59 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[59], ACTIVEJ.data$ACTIVEJ[59],temp58)
temp60 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[60], ACTIVEJ.data$ACTIVEJ[60],temp59)
temp61 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[61], ACTIVEJ.data$ACTIVEJ[61],temp60)
temp62 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[62], ACTIVEJ.data$ACTIVEJ[62],temp61)
temp63 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[63], ACTIVEJ.data$ACTIVEJ[63],temp62)
temp64 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[64], ACTIVEJ.data$ACTIVEJ[64],temp63)
temp65 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[65], ACTIVEJ.data$ACTIVEJ[65],temp64)
temp66 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[66], ACTIVEJ.data$ACTIVEJ[66],temp65)
temp67 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[67], ACTIVEJ.data$ACTIVEJ[67],temp66)
temp68 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[68], ACTIVEJ.data$ACTIVEJ[68],temp67)
temp69 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[69], ACTIVEJ.data$ACTIVEJ[69],temp68)
temp70 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[70], ACTIVEJ.data$ACTIVEJ[70],temp69)
temp71 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[71], ACTIVEJ.data$ACTIVEJ[71],temp70)
temp72 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[72], ACTIVEJ.data$ACTIVEJ[72],temp71)
temp73 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[73], ACTIVEJ.data$ACTIVEJ[73],temp72)
temp74 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[74], ACTIVEJ.data$ACTIVEJ[74],temp73)
temp75 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[75], ACTIVEJ.data$ACTIVEJ[75],temp74)
temp76 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[76], ACTIVEJ.data$ACTIVEJ[76],temp75)
temp77 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[77], ACTIVEJ.data$ACTIVEJ[77],temp76)
temp78 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[78], ACTIVEJ.data$ACTIVEJ[78],temp77)
temp79 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[79], ACTIVEJ.data$ACTIVEJ[79],temp78)
temp80 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[80], ACTIVEJ.data$ACTIVEJ[80],temp79)
temp81 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[81], ACTIVEJ.data$ACTIVEJ[81],temp80)
temp82 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[82], ACTIVEJ.data$ACTIVEJ[82],temp81)
temp83 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[83], ACTIVEJ.data$ACTIVEJ[83],temp82)
temp84 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[84], ACTIVEJ.data$ACTIVEJ[84],temp83)
temp85 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[85], ACTIVEJ.data$ACTIVEJ[85],temp84)
temp86 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[86], ACTIVEJ.data$ACTIVEJ[86],temp85)
temp87 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[87], ACTIVEJ.data$ACTIVEJ[87],temp86)
temp88 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[88], ACTIVEJ.data$ACTIVEJ[88],temp87)
temp89 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[89], ACTIVEJ.data$ACTIVEJ[89],temp88)
temp90 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[90], ACTIVEJ.data$ACTIVEJ[90],temp89)
temp91 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[91], ACTIVEJ.data$ACTIVEJ[91],temp90)
temp92 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[92], ACTIVEJ.data$ACTIVEJ[92],temp91)
temp93 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[93], ACTIVEJ.data$ACTIVEJ[93],temp92)
temp94 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[94], ACTIVEJ.data$ACTIVEJ[94],temp93)
temp95 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[95], ACTIVEJ.data$ACTIVEJ[95],temp94)
temp96 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[96], ACTIVEJ.data$ACTIVEJ[96],temp95)
temp97 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[97], ACTIVEJ.data$ACTIVEJ[97],temp96)
temp98 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[98], ACTIVEJ.data$ACTIVEJ[98],temp97)
temp99 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[99], ACTIVEJ.data$ACTIVEJ[99],temp98)
temp100 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[100], ACTIVEJ.data$ACTIVEJ[100],temp99)
temp101 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[101], ACTIVEJ.data$ACTIVEJ[101],temp100)
temp102 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[102], ACTIVEJ.data$ACTIVEJ[102],temp101)
temp103 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[103], ACTIVEJ.data$ACTIVEJ[103],temp102)
temp104 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[104], ACTIVEJ.data$ACTIVEJ[104],temp103)
temp105 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[105], ACTIVEJ.data$ACTIVEJ[105],temp104)
temp106 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[106], ACTIVEJ.data$ACTIVEJ[106],temp105)
temp107 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[107], ACTIVEJ.data$ACTIVEJ[107],temp106)
temp108 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[108], ACTIVEJ.data$ACTIVEJ[108],temp107)
temp109 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[109], ACTIVEJ.data$ACTIVEJ[109],temp108)
temp110 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[110], ACTIVEJ.data$ACTIVEJ[110],temp109)
temp111 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[111], ACTIVEJ.data$ACTIVEJ[111],temp110)
temp112 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[112], ACTIVEJ.data$ACTIVEJ[112],temp111)
temp113 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[113], ACTIVEJ.data$ACTIVEJ[113],temp112)
temp114 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[114], ACTIVEJ.data$ACTIVEJ[114],temp113)
temp115 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[115], ACTIVEJ.data$ACTIVEJ[115],temp114)
temp116 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[116], ACTIVEJ.data$ACTIVEJ[116],temp115)
temp117 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[117], ACTIVEJ.data$ACTIVEJ[117],temp116)
temp118 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[118], ACTIVEJ.data$ACTIVEJ[118],temp117)
temp119 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[119], ACTIVEJ.data$ACTIVEJ[119],temp118)
temp120 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[120], ACTIVEJ.data$ACTIVEJ[120],temp119)
temp121 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[121], ACTIVEJ.data$ACTIVEJ[121],temp120)
temp122 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[122], ACTIVEJ.data$ACTIVEJ[122],temp121)
temp123 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[123], ACTIVEJ.data$ACTIVEJ[123],temp122)
temp124 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[124], ACTIVEJ.data$ACTIVEJ[124],temp123)
temp125 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[125], ACTIVEJ.data$ACTIVEJ[125],temp124)
temp126 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[126], ACTIVEJ.data$ACTIVEJ[126],temp125)
temp127 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[127], ACTIVEJ.data$ACTIVEJ[127],temp126)
temp128 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[128], ACTIVEJ.data$ACTIVEJ[128],temp127)
temp129 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[129], ACTIVEJ.data$ACTIVEJ[129],temp128)
temp130 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[130], ACTIVEJ.data$ACTIVEJ[130],temp129)
temp131 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[131], ACTIVEJ.data$ACTIVEJ[131],temp130)
temp132 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[132], ACTIVEJ.data$ACTIVEJ[132],temp131)
temp133 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[133], ACTIVEJ.data$ACTIVEJ[133],temp132)
temp134 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[134], ACTIVEJ.data$ACTIVEJ[134],temp133)
temp135 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[135], ACTIVEJ.data$ACTIVEJ[135],temp134)
temp136 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[136], ACTIVEJ.data$ACTIVEJ[136],temp135)
temp137 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[137], ACTIVEJ.data$ACTIVEJ[137],temp136)
temp138 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[138], ACTIVEJ.data$ACTIVEJ[138],temp137)
temp139 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[139], ACTIVEJ.data$ACTIVEJ[139],temp138)
temp140 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[140], ACTIVEJ.data$ACTIVEJ[140],temp139)
temp141 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[141], ACTIVEJ.data$ACTIVEJ[141],temp140)
temp142 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[142], ACTIVEJ.data$ACTIVEJ[142],temp141)
temp143 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[143], ACTIVEJ.data$ACTIVEJ[143],temp142)
temp144 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[144], ACTIVEJ.data$ACTIVEJ[144],temp143)
temp145 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[145], ACTIVEJ.data$ACTIVEJ[145],temp144)
temp146 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[146], ACTIVEJ.data$ACTIVEJ[146],temp145)
temp147 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[147], ACTIVEJ.data$ACTIVEJ[147],temp146)
temp148 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[148], ACTIVEJ.data$ACTIVEJ[148],temp147)
temp149 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[149], ACTIVEJ.data$ACTIVEJ[149],temp148)
temp150 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[150], ACTIVEJ.data$ACTIVEJ[150],temp149)
temp151 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[151], ACTIVEJ.data$ACTIVEJ[151],temp150)
temp152 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[152], ACTIVEJ.data$ACTIVEJ[152],temp151)
temp153 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[153], ACTIVEJ.data$ACTIVEJ[153],temp152)
temp154 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[154], ACTIVEJ.data$ACTIVEJ[154],temp153)
temp155 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[155], ACTIVEJ.data$ACTIVEJ[155],temp154)
temp156 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[156], ACTIVEJ.data$ACTIVEJ[156],temp155)
temp157 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[157], ACTIVEJ.data$ACTIVEJ[157],temp156)
temp158 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[158], ACTIVEJ.data$ACTIVEJ[158],temp157)
temp159 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[159], ACTIVEJ.data$ACTIVEJ[159],temp158)
temp160 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[160], ACTIVEJ.data$ACTIVEJ[160],temp159)
temp161 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[161], ACTIVEJ.data$ACTIVEJ[161],temp160)
temp162 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[162], ACTIVEJ.data$ACTIVEJ[162],temp161)
temp163 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[163], ACTIVEJ.data$ACTIVEJ[163],temp162)
temp164 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[164], ACTIVEJ.data$ACTIVEJ[164],temp163)
temp165 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[165], ACTIVEJ.data$ACTIVEJ[165],temp164)
temp166 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[166], ACTIVEJ.data$ACTIVEJ[166],temp165)
temp167 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[167], ACTIVEJ.data$ACTIVEJ[167],temp166)
temp168 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[168], ACTIVEJ.data$ACTIVEJ[168],temp167)
temp169 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[169], ACTIVEJ.data$ACTIVEJ[169],temp168)
temp170 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[170], ACTIVEJ.data$ACTIVEJ[170],temp169)
temp171 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[171], ACTIVEJ.data$ACTIVEJ[171],temp170)
temp172 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[172], ACTIVEJ.data$ACTIVEJ[172],temp171)
temp173 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[173], ACTIVEJ.data$ACTIVEJ[173],temp172)
temp174 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[174], ACTIVEJ.data$ACTIVEJ[174],temp173)
temp175 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[175], ACTIVEJ.data$ACTIVEJ[175],temp174)
temp176 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[176], ACTIVEJ.data$ACTIVEJ[176],temp175)
temp177 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[177], ACTIVEJ.data$ACTIVEJ[177],temp176)
temp178 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[178], ACTIVEJ.data$ACTIVEJ[178],temp177)
temp179 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[179], ACTIVEJ.data$ACTIVEJ[179],temp178)
temp180 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[180], ACTIVEJ.data$ACTIVEJ[180],temp179)
temp181 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[181], ACTIVEJ.data$ACTIVEJ[181],temp180)
temp182 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[182], ACTIVEJ.data$ACTIVEJ[182],temp181)
temp183 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[183], ACTIVEJ.data$ACTIVEJ[183],temp182)
temp184 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[184], ACTIVEJ.data$ACTIVEJ[184],temp183)
temp185 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[185], ACTIVEJ.data$ACTIVEJ[185],temp184)
temp186 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[186], ACTIVEJ.data$ACTIVEJ[186],temp185)
temp187 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[187], ACTIVEJ.data$ACTIVEJ[187],temp186)
temp188 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[188], ACTIVEJ.data$ACTIVEJ[188],temp187)
temp189 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[189], ACTIVEJ.data$ACTIVEJ[189],temp188)
temp190 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[190], ACTIVEJ.data$ACTIVEJ[190],temp189)
temp191 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[191], ACTIVEJ.data$ACTIVEJ[191],temp190)
temp192 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[192], ACTIVEJ.data$ACTIVEJ[192],temp191)
temp193 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[193], ACTIVEJ.data$ACTIVEJ[193],temp192)
temp194 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[194], ACTIVEJ.data$ACTIVEJ[194],temp193)
temp195 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[195], ACTIVEJ.data$ACTIVEJ[195],temp194)
temp196 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[196], ACTIVEJ.data$ACTIVEJ[196],temp195)
temp197 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[197], ACTIVEJ.data$ACTIVEJ[197],temp196)
temp198 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[198], ACTIVEJ.data$ACTIVEJ[198],temp197)
temp199 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[199], ACTIVEJ.data$ACTIVEJ[199],temp198)
temp200 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[200], ACTIVEJ.data$ACTIVEJ[200],temp199)
temp201 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[201], ACTIVEJ.data$ACTIVEJ[201],temp200)
temp202 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[202], ACTIVEJ.data$ACTIVEJ[202],temp201)
temp203 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[203], ACTIVEJ.data$ACTIVEJ[203],temp202)
temp204 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[204], ACTIVEJ.data$ACTIVEJ[204],temp203)
temp205 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[205], ACTIVEJ.data$ACTIVEJ[205],temp204)
temp206 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[206], ACTIVEJ.data$ACTIVEJ[206],temp205)
temp207 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[207], ACTIVEJ.data$ACTIVEJ[207],temp206)
temp208 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[208], ACTIVEJ.data$ACTIVEJ[208],temp207)
temp209 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[209], ACTIVEJ.data$ACTIVEJ[209],temp208)
temp210 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[210], ACTIVEJ.data$ACTIVEJ[210],temp209)
temp211 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[211], ACTIVEJ.data$ACTIVEJ[211],temp210)
temp212 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[212], ACTIVEJ.data$ACTIVEJ[212],temp211)
temp213 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[213], ACTIVEJ.data$ACTIVEJ[213],temp212)
temp214 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[214], ACTIVEJ.data$ACTIVEJ[214],temp213)
temp215 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[215], ACTIVEJ.data$ACTIVEJ[215],temp214)
temp216 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[216], ACTIVEJ.data$ACTIVEJ[216],temp215)
temp217 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[217], ACTIVEJ.data$ACTIVEJ[217],temp216)
temp218 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[218], ACTIVEJ.data$ACTIVEJ[218],temp217)
temp219 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[219], ACTIVEJ.data$ACTIVEJ[219],temp218)
temp220 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[220], ACTIVEJ.data$ACTIVEJ[220],temp219)
temp221 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[221], ACTIVEJ.data$ACTIVEJ[221],temp220)
temp222 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[222], ACTIVEJ.data$ACTIVEJ[222],temp221)
temp223 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[223], ACTIVEJ.data$ACTIVEJ[223],temp222)
temp224 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[224], ACTIVEJ.data$ACTIVEJ[224],temp223)
temp225 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[225], ACTIVEJ.data$ACTIVEJ[225],temp224)
temp226 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[226], ACTIVEJ.data$ACTIVEJ[226],temp225)
temp227 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[227], ACTIVEJ.data$ACTIVEJ[227],temp226)
temp228 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[228], ACTIVEJ.data$ACTIVEJ[228],temp227)
temp229 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[229], ACTIVEJ.data$ACTIVEJ[229],temp228)
temp230 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[230], ACTIVEJ.data$ACTIVEJ[230],temp229)
temp231 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[231], ACTIVEJ.data$ACTIVEJ[231],temp230)
temp232 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[232], ACTIVEJ.data$ACTIVEJ[232],temp231)
temp233 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[233], ACTIVEJ.data$ACTIVEJ[233],temp232)
temp234 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[234], ACTIVEJ.data$ACTIVEJ[234],temp233)
temp235 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[235], ACTIVEJ.data$ACTIVEJ[235],temp234)
temp236 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[236], ACTIVEJ.data$ACTIVEJ[236],temp235)
temp237 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[237], ACTIVEJ.data$ACTIVEJ[237],temp236)
temp238 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[238], ACTIVEJ.data$ACTIVEJ[238],temp237)
temp239 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[239], ACTIVEJ.data$ACTIVEJ[239],temp238)
temp240 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[240], ACTIVEJ.data$ACTIVEJ[240],temp239)
temp241 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[241], ACTIVEJ.data$ACTIVEJ[241],temp240)
temp242 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[242], ACTIVEJ.data$ACTIVEJ[242],temp241)
temp243 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[243], ACTIVEJ.data$ACTIVEJ[243],temp242)
temp244 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[244], ACTIVEJ.data$ACTIVEJ[244],temp243)
temp245 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[245], ACTIVEJ.data$ACTIVEJ[245],temp244)
temp246 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[246], ACTIVEJ.data$ACTIVEJ[246],temp245)
temp247 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[247], ACTIVEJ.data$ACTIVEJ[247],temp246)
temp248 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[248], ACTIVEJ.data$ACTIVEJ[248],temp247)
temp249 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[249], ACTIVEJ.data$ACTIVEJ[249],temp248)
temp250 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[250], ACTIVEJ.data$ACTIVEJ[250],temp249)
temp251 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[251], ACTIVEJ.data$ACTIVEJ[251],temp250)
temp252 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[252], ACTIVEJ.data$ACTIVEJ[252],temp251)
temp253 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[253], ACTIVEJ.data$ACTIVEJ[253],temp252)
temp254 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[254], ACTIVEJ.data$ACTIVEJ[254],temp253)
temp255 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[255], ACTIVEJ.data$ACTIVEJ[255],temp254)
temp256 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[256], ACTIVEJ.data$ACTIVEJ[256],temp255)
temp257 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[257], ACTIVEJ.data$ACTIVEJ[257],temp256)
temp258 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[258], ACTIVEJ.data$ACTIVEJ[258],temp257)
temp259 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[259], ACTIVEJ.data$ACTIVEJ[259],temp258)
temp260 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[260], ACTIVEJ.data$ACTIVEJ[260],temp259)
temp261 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[261], ACTIVEJ.data$ACTIVEJ[261],temp260)
temp262 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[262], ACTIVEJ.data$ACTIVEJ[262],temp261)
temp263 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[263], ACTIVEJ.data$ACTIVEJ[263],temp262)
temp264 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[264], ACTIVEJ.data$ACTIVEJ[264],temp263)
temp265 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[265], ACTIVEJ.data$ACTIVEJ[265],temp264)
temp266 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[266], ACTIVEJ.data$ACTIVEJ[266],temp265)
temp267 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[267], ACTIVEJ.data$ACTIVEJ[267],temp266)
temp268 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[268], ACTIVEJ.data$ACTIVEJ[268],temp267)
temp269 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[269], ACTIVEJ.data$ACTIVEJ[269],temp268)
temp270 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[270], ACTIVEJ.data$ACTIVEJ[270],temp269)
temp271 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[271], ACTIVEJ.data$ACTIVEJ[271],temp270)
temp272 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[272], ACTIVEJ.data$ACTIVEJ[272],temp271)
temp273 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[273], ACTIVEJ.data$ACTIVEJ[273],temp272)
temp274 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[274], ACTIVEJ.data$ACTIVEJ[274],temp273)
temp275 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[275], ACTIVEJ.data$ACTIVEJ[275],temp274)
temp276 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[276], ACTIVEJ.data$ACTIVEJ[276],temp275)
temp277 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[277], ACTIVEJ.data$ACTIVEJ[277],temp276)
temp278 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[278], ACTIVEJ.data$ACTIVEJ[278],temp277)
temp279 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[279], ACTIVEJ.data$ACTIVEJ[279],temp278)
temp280 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[280], ACTIVEJ.data$ACTIVEJ[280],temp279)
temp281 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[281], ACTIVEJ.data$ACTIVEJ[281],temp280)
temp282 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[282], ACTIVEJ.data$ACTIVEJ[282],temp281)
temp283 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[283], ACTIVEJ.data$ACTIVEJ[283],temp282)
temp284 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[284], ACTIVEJ.data$ACTIVEJ[284],temp283)
temp285 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[285], ACTIVEJ.data$ACTIVEJ[285],temp284)
temp286 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[286], ACTIVEJ.data$ACTIVEJ[286],temp285)
temp287 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[287], ACTIVEJ.data$ACTIVEJ[287],temp286)
temp288 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[288], ACTIVEJ.data$ACTIVEJ[288],temp287)
temp289 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[289], ACTIVEJ.data$ACTIVEJ[289],temp288)
temp290 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[290], ACTIVEJ.data$ACTIVEJ[290],temp289)
temp291 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[291], ACTIVEJ.data$ACTIVEJ[291],temp290)
temp292 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[292], ACTIVEJ.data$ACTIVEJ[292],temp291)
temp293 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[293], ACTIVEJ.data$ACTIVEJ[293],temp292)
temp294 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[294], ACTIVEJ.data$ACTIVEJ[294],temp293)
temp295 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[295], ACTIVEJ.data$ACTIVEJ[295],temp294)
temp296 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[296], ACTIVEJ.data$ACTIVEJ[296],temp295)
temp297 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[297], ACTIVEJ.data$ACTIVEJ[297],temp296)
temp298 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[298], ACTIVEJ.data$ACTIVEJ[298],temp297)
temp299 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[299], ACTIVEJ.data$ACTIVEJ[299],temp298)
temp300 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[300], ACTIVEJ.data$ACTIVEJ[300],temp299)
temp301 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[301], ACTIVEJ.data$ACTIVEJ[301],temp300)
temp302 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[302], ACTIVEJ.data$ACTIVEJ[302],temp301)
temp303 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[303], ACTIVEJ.data$ACTIVEJ[303],temp302)
temp304 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[304], ACTIVEJ.data$ACTIVEJ[304],temp303)
temp305 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[305], ACTIVEJ.data$ACTIVEJ[305],temp304)
temp306 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[306], ACTIVEJ.data$ACTIVEJ[306],temp305)
temp307 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[307], ACTIVEJ.data$ACTIVEJ[307],temp306)
temp308 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[308], ACTIVEJ.data$ACTIVEJ[308],temp307)
temp309 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[309], ACTIVEJ.data$ACTIVEJ[309],temp308)
temp310 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[310], ACTIVEJ.data$ACTIVEJ[310],temp309)
temp311 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[311], ACTIVEJ.data$ACTIVEJ[311],temp310)
temp312 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[312], ACTIVEJ.data$ACTIVEJ[312],temp311)
temp313 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[313], ACTIVEJ.data$ACTIVEJ[313],temp312)
temp314 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[314], ACTIVEJ.data$ACTIVEJ[314],temp313)
temp315 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[315], ACTIVEJ.data$ACTIVEJ[315],temp314)
temp316 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[316], ACTIVEJ.data$ACTIVEJ[316],temp315)
temp317 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[317], ACTIVEJ.data$ACTIVEJ[317],temp316)
temp318 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[318], ACTIVEJ.data$ACTIVEJ[318],temp317)
temp319 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[319], ACTIVEJ.data$ACTIVEJ[319],temp318)
temp320 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[320], ACTIVEJ.data$ACTIVEJ[320],temp319)
temp321 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[321], ACTIVEJ.data$ACTIVEJ[321],temp320)
temp322 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[322], ACTIVEJ.data$ACTIVEJ[322],temp321)
temp323 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[323], ACTIVEJ.data$ACTIVEJ[323],temp322)
temp324 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[324], ACTIVEJ.data$ACTIVEJ[324],temp323)
temp325 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[325], ACTIVEJ.data$ACTIVEJ[325],temp324)
temp326 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[326], ACTIVEJ.data$ACTIVEJ[326],temp325)
temp327 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[327], ACTIVEJ.data$ACTIVEJ[327],temp326)
temp328 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[328], ACTIVEJ.data$ACTIVEJ[328],temp327)
temp329 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[329], ACTIVEJ.data$ACTIVEJ[329],temp328)
temp330 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[330], ACTIVEJ.data$ACTIVEJ[330],temp329)
temp331 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[331], ACTIVEJ.data$ACTIVEJ[331],temp330)
temp332 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[332], ACTIVEJ.data$ACTIVEJ[332],temp331)
temp333 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[333], ACTIVEJ.data$ACTIVEJ[333],temp332)
temp334 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[334], ACTIVEJ.data$ACTIVEJ[334],temp333)
temp335 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[335], ACTIVEJ.data$ACTIVEJ[335],temp334)
temp336 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[336], ACTIVEJ.data$ACTIVEJ[336],temp335)
temp337 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[337], ACTIVEJ.data$ACTIVEJ[337],temp336)
temp338 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[338], ACTIVEJ.data$ACTIVEJ[338],temp337)
temp339 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[339], ACTIVEJ.data$ACTIVEJ[339],temp338)
temp340 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[340], ACTIVEJ.data$ACTIVEJ[340],temp339)
temp341 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[341], ACTIVEJ.data$ACTIVEJ[341],temp340)
temp342 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[342], ACTIVEJ.data$ACTIVEJ[342],temp341)
temp343 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[343], ACTIVEJ.data$ACTIVEJ[343],temp342)
temp344 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[344], ACTIVEJ.data$ACTIVEJ[344],temp343)
temp345 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[345], ACTIVEJ.data$ACTIVEJ[345],temp344)
temp346 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[346], ACTIVEJ.data$ACTIVEJ[346],temp345)
temp347 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[347], ACTIVEJ.data$ACTIVEJ[347],temp346)
temp348 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[348], ACTIVEJ.data$ACTIVEJ[348],temp347)
temp349 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[349], ACTIVEJ.data$ACTIVEJ[349],temp348)
temp350 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[350], ACTIVEJ.data$ACTIVEJ[350],temp349)
temp351 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[351], ACTIVEJ.data$ACTIVEJ[351],temp350)
temp352 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[352], ACTIVEJ.data$ACTIVEJ[352],temp351)
temp353 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[353], ACTIVEJ.data$ACTIVEJ[353],temp352)
temp354 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[354], ACTIVEJ.data$ACTIVEJ[354],temp353)
temp355 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[355], ACTIVEJ.data$ACTIVEJ[355],temp354)
temp356 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[356], ACTIVEJ.data$ACTIVEJ[356],temp355)
temp357 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[357], ACTIVEJ.data$ACTIVEJ[357],temp356)
temp358 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[358], ACTIVEJ.data$ACTIVEJ[358],temp357)
temp359 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[359], ACTIVEJ.data$ACTIVEJ[359],temp358)
temp360 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[360], ACTIVEJ.data$ACTIVEJ[360],temp359)
temp361 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[361], ACTIVEJ.data$ACTIVEJ[361],temp360)
temp362 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[362], ACTIVEJ.data$ACTIVEJ[362],temp361)
temp363 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[363], ACTIVEJ.data$ACTIVEJ[363],temp362)
temp364 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[364], ACTIVEJ.data$ACTIVEJ[364],temp363)
temp365 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[365], ACTIVEJ.data$ACTIVEJ[365],temp364)
temp366 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[366], ACTIVEJ.data$ACTIVEJ[366],temp365)
temp367 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[367], ACTIVEJ.data$ACTIVEJ[367],temp366)
temp368 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[368], ACTIVEJ.data$ACTIVEJ[368],temp367)
temp369 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[369], ACTIVEJ.data$ACTIVEJ[369],temp368)
temp370 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[370], ACTIVEJ.data$ACTIVEJ[370],temp369)
temp371 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[371], ACTIVEJ.data$ACTIVEJ[371],temp370)
temp372 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[372], ACTIVEJ.data$ACTIVEJ[372],temp371)
temp373 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[373], ACTIVEJ.data$ACTIVEJ[373],temp372)
temp374 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[374], ACTIVEJ.data$ACTIVEJ[374],temp373)
temp375 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[375], ACTIVEJ.data$ACTIVEJ[375],temp374)
temp376 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[376], ACTIVEJ.data$ACTIVEJ[376],temp375)
temp377 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[377], ACTIVEJ.data$ACTIVEJ[377],temp376)
temp378 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[378], ACTIVEJ.data$ACTIVEJ[378],temp377)
temp379 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[379], ACTIVEJ.data$ACTIVEJ[379],temp378)
temp380 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[380], ACTIVEJ.data$ACTIVEJ[380],temp379)
temp381 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[381], ACTIVEJ.data$ACTIVEJ[381],temp380)
temp382 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[382], ACTIVEJ.data$ACTIVEJ[382],temp381)
temp383 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[383], ACTIVEJ.data$ACTIVEJ[383],temp382)
temp384 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[384], ACTIVEJ.data$ACTIVEJ[384],temp383)
temp385 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[385], ACTIVEJ.data$ACTIVEJ[385],temp384)
temp386 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[386], ACTIVEJ.data$ACTIVEJ[386],temp385)
temp387 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[387], ACTIVEJ.data$ACTIVEJ[387],temp386)
temp388 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[388], ACTIVEJ.data$ACTIVEJ[388],temp387)
temp389 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[389], ACTIVEJ.data$ACTIVEJ[389],temp388)
temp390 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[390], ACTIVEJ.data$ACTIVEJ[390],temp389)
temp391 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[391], ACTIVEJ.data$ACTIVEJ[391],temp390)
temp392 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[392], ACTIVEJ.data$ACTIVEJ[392],temp391)
temp393 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[393], ACTIVEJ.data$ACTIVEJ[393],temp392)
temp394 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[394], ACTIVEJ.data$ACTIVEJ[394],temp393)
temp395 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[395], ACTIVEJ.data$ACTIVEJ[395],temp394)
temp396 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[396], ACTIVEJ.data$ACTIVEJ[396],temp395)
temp397 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[397], ACTIVEJ.data$ACTIVEJ[397],temp396)
temp398 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[398], ACTIVEJ.data$ACTIVEJ[398],temp397)
temp399 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[399], ACTIVEJ.data$ACTIVEJ[399],temp398)
temp400 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[400], ACTIVEJ.data$ACTIVEJ[400],temp399)
temp401 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[401], ACTIVEJ.data$ACTIVEJ[401],temp400)
temp402 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[402], ACTIVEJ.data$ACTIVEJ[402],temp401)
temp403 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[403], ACTIVEJ.data$ACTIVEJ[403],temp402)
temp404 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[404], ACTIVEJ.data$ACTIVEJ[404],temp403)
temp405 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[405], ACTIVEJ.data$ACTIVEJ[405],temp404)
temp406 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[406], ACTIVEJ.data$ACTIVEJ[406],temp405)
temp407 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[407], ACTIVEJ.data$ACTIVEJ[407],temp406)
temp408 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[408], ACTIVEJ.data$ACTIVEJ[408],temp407)
temp409 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[409], ACTIVEJ.data$ACTIVEJ[409],temp408)
temp410 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[410], ACTIVEJ.data$ACTIVEJ[410],temp409)
temp411 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[411], ACTIVEJ.data$ACTIVEJ[411],temp410)
temp412 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[412], ACTIVEJ.data$ACTIVEJ[412],temp411)
temp413 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[413], ACTIVEJ.data$ACTIVEJ[413],temp412)
temp414 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[414], ACTIVEJ.data$ACTIVEJ[414],temp413)
temp415 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[415], ACTIVEJ.data$ACTIVEJ[415],temp414)
temp416 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[416], ACTIVEJ.data$ACTIVEJ[416],temp415)
temp417 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[417], ACTIVEJ.data$ACTIVEJ[417],temp416)
temp418 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[418], ACTIVEJ.data$ACTIVEJ[418],temp417)
temp419 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[419], ACTIVEJ.data$ACTIVEJ[419],temp418)
temp420 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[420], ACTIVEJ.data$ACTIVEJ[420],temp419)
temp421 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[421], ACTIVEJ.data$ACTIVEJ[421],temp420)
temp422 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[422], ACTIVEJ.data$ACTIVEJ[422],temp421)
temp423 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[423], ACTIVEJ.data$ACTIVEJ[423],temp422)
temp424 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[424], ACTIVEJ.data$ACTIVEJ[424],temp423)
temp425 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[425], ACTIVEJ.data$ACTIVEJ[425],temp424)
temp426 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[426], ACTIVEJ.data$ACTIVEJ[426],temp425)
temp427 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[427], ACTIVEJ.data$ACTIVEJ[427],temp426)
temp428 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[428], ACTIVEJ.data$ACTIVEJ[428],temp427)
temp429 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[429], ACTIVEJ.data$ACTIVEJ[429],temp428)
temp430 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[430], ACTIVEJ.data$ACTIVEJ[430],temp429)
temp431 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[431], ACTIVEJ.data$ACTIVEJ[431],temp430)
temp432 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[432], ACTIVEJ.data$ACTIVEJ[432],temp431)
temp433 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[433], ACTIVEJ.data$ACTIVEJ[433],temp432)
temp434 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[434], ACTIVEJ.data$ACTIVEJ[434],temp433)
temp435 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[435], ACTIVEJ.data$ACTIVEJ[435],temp434)
temp436 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[436], ACTIVEJ.data$ACTIVEJ[436],temp435)
temp437 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[437], ACTIVEJ.data$ACTIVEJ[437],temp436)
temp438 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[438], ACTIVEJ.data$ACTIVEJ[438],temp437)
temp439 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[439], ACTIVEJ.data$ACTIVEJ[439],temp438)
temp440 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[440], ACTIVEJ.data$ACTIVEJ[440],temp439)
temp441 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[441], ACTIVEJ.data$ACTIVEJ[441],temp440)
temp442 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[442], ACTIVEJ.data$ACTIVEJ[442],temp441)
temp443 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[443], ACTIVEJ.data$ACTIVEJ[443],temp442)
temp444 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[444], ACTIVEJ.data$ACTIVEJ[444],temp443)
temp445 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[445], ACTIVEJ.data$ACTIVEJ[445],temp444)
temp446 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[446], ACTIVEJ.data$ACTIVEJ[446],temp445)
temp447 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[447], ACTIVEJ.data$ACTIVEJ[447],temp446)
temp448 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[448], ACTIVEJ.data$ACTIVEJ[448],temp447)
temp449 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[449], ACTIVEJ.data$ACTIVEJ[449],temp448)
temp450 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[450], ACTIVEJ.data$ACTIVEJ[450],temp449)
temp451 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[451], ACTIVEJ.data$ACTIVEJ[451],temp450)
temp452 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[452], ACTIVEJ.data$ACTIVEJ[452],temp451)
temp453 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[453], ACTIVEJ.data$ACTIVEJ[453],temp452)
temp454 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[454], ACTIVEJ.data$ACTIVEJ[454],temp453)
temp455 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[455], ACTIVEJ.data$ACTIVEJ[455],temp454)
temp456 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[456], ACTIVEJ.data$ACTIVEJ[456],temp455)
temp457 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[457], ACTIVEJ.data$ACTIVEJ[457],temp456)
temp458 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[458], ACTIVEJ.data$ACTIVEJ[458],temp457)
temp459 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[459], ACTIVEJ.data$ACTIVEJ[459],temp458)
temp460 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[460], ACTIVEJ.data$ACTIVEJ[460],temp459)
temp461 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[461], ACTIVEJ.data$ACTIVEJ[461],temp460)
temp462 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[462], ACTIVEJ.data$ACTIVEJ[462],temp461)
temp463 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[463], ACTIVEJ.data$ACTIVEJ[463],temp462)
temp464 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[464], ACTIVEJ.data$ACTIVEJ[464],temp463)
temp465 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[465], ACTIVEJ.data$ACTIVEJ[465],temp464)
temp466 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[466], ACTIVEJ.data$ACTIVEJ[466],temp465)
temp467 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[467], ACTIVEJ.data$ACTIVEJ[467],temp466)
temp468 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[468], ACTIVEJ.data$ACTIVEJ[468],temp467)
temp469 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[469], ACTIVEJ.data$ACTIVEJ[469],temp468)
temp470 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[470], ACTIVEJ.data$ACTIVEJ[470],temp469)
temp471 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[471], ACTIVEJ.data$ACTIVEJ[471],temp470)
temp472 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[472], ACTIVEJ.data$ACTIVEJ[472],temp471)
temp473 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[473], ACTIVEJ.data$ACTIVEJ[473],temp472)
temp474 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[474], ACTIVEJ.data$ACTIVEJ[474],temp473)
temp475 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[475], ACTIVEJ.data$ACTIVEJ[475],temp474)
temp476 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[476], ACTIVEJ.data$ACTIVEJ[476],temp475)
temp477 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[477], ACTIVEJ.data$ACTIVEJ[477],temp476)
temp478 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[478], ACTIVEJ.data$ACTIVEJ[478],temp477)
temp479 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[479], ACTIVEJ.data$ACTIVEJ[479],temp478)
temp480 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[480], ACTIVEJ.data$ACTIVEJ[480],temp479)
temp481 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[481], ACTIVEJ.data$ACTIVEJ[481],temp480)
temp482 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[482], ACTIVEJ.data$ACTIVEJ[482],temp481)
temp483 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[483], ACTIVEJ.data$ACTIVEJ[483],temp482)
temp484 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[484], ACTIVEJ.data$ACTIVEJ[484],temp483)
temp485 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[485], ACTIVEJ.data$ACTIVEJ[485],temp484)
temp486 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[486], ACTIVEJ.data$ACTIVEJ[486],temp485)
temp487 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[487], ACTIVEJ.data$ACTIVEJ[487],temp486)
temp488 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[488], ACTIVEJ.data$ACTIVEJ[488],temp487)
temp489 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[489], ACTIVEJ.data$ACTIVEJ[489],temp488)
temp490 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[490], ACTIVEJ.data$ACTIVEJ[490],temp489)
temp491 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[491], ACTIVEJ.data$ACTIVEJ[491],temp490)
temp492 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[492], ACTIVEJ.data$ACTIVEJ[492],temp491)
temp493 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[493], ACTIVEJ.data$ACTIVEJ[493],temp492)
temp494 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[494], ACTIVEJ.data$ACTIVEJ[494],temp493)
temp495 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[495], ACTIVEJ.data$ACTIVEJ[495],temp494)
temp496 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[496], ACTIVEJ.data$ACTIVEJ[496],temp495)
temp497 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[497], ACTIVEJ.data$ACTIVEJ[497],temp496)
temp498 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[498], ACTIVEJ.data$ACTIVEJ[498],temp497)
temp499 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[499], ACTIVEJ.data$ACTIVEJ[499],temp498)
temp500 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[500], ACTIVEJ.data$ACTIVEJ[500],temp499)
temp501 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[501], ACTIVEJ.data$ACTIVEJ[501],temp500)
temp502 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[502], ACTIVEJ.data$ACTIVEJ[502],temp501)
temp503 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[503], ACTIVEJ.data$ACTIVEJ[503],temp502)
temp504 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[504], ACTIVEJ.data$ACTIVEJ[504],temp503)
temp505 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[505], ACTIVEJ.data$ACTIVEJ[505],temp504)
temp506 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[506], ACTIVEJ.data$ACTIVEJ[506],temp505)
temp507 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[507], ACTIVEJ.data$ACTIVEJ[507],temp506)
temp508 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[508], ACTIVEJ.data$ACTIVEJ[508],temp507)
temp509 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[509], ACTIVEJ.data$ACTIVEJ[509],temp508)
temp510 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[510], ACTIVEJ.data$ACTIVEJ[510],temp509)
temp511 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[511], ACTIVEJ.data$ACTIVEJ[511],temp510)
temp512 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[512], ACTIVEJ.data$ACTIVEJ[512],temp511)
temp513 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[513], ACTIVEJ.data$ACTIVEJ[513],temp512)
temp514 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[514], ACTIVEJ.data$ACTIVEJ[514],temp513)
temp515 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[515], ACTIVEJ.data$ACTIVEJ[515],temp514)
temp516 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[516], ACTIVEJ.data$ACTIVEJ[516],temp515)
temp517 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[517], ACTIVEJ.data$ACTIVEJ[517],temp516)
temp518 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[518], ACTIVEJ.data$ACTIVEJ[518],temp517)
temp519 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[519], ACTIVEJ.data$ACTIVEJ[519],temp518)
temp520 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[520], ACTIVEJ.data$ACTIVEJ[520],temp519)
temp521 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[521], ACTIVEJ.data$ACTIVEJ[521],temp520)
temp522 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[522], ACTIVEJ.data$ACTIVEJ[522],temp521)
temp523 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[523], ACTIVEJ.data$ACTIVEJ[523],temp522)
temp524 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[524], ACTIVEJ.data$ACTIVEJ[524],temp523)
temp525 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[525], ACTIVEJ.data$ACTIVEJ[525],temp524)
temp526 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[526], ACTIVEJ.data$ACTIVEJ[526],temp525)
temp527 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[527], ACTIVEJ.data$ACTIVEJ[527],temp526)
temp528 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[528], ACTIVEJ.data$ACTIVEJ[528],temp527)
temp529 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[529], ACTIVEJ.data$ACTIVEJ[529],temp528)
temp530 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[530], ACTIVEJ.data$ACTIVEJ[530],temp529)
temp531 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[531], ACTIVEJ.data$ACTIVEJ[531],temp530)
temp532 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[532], ACTIVEJ.data$ACTIVEJ[532],temp531)
temp533 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[533], ACTIVEJ.data$ACTIVEJ[533],temp532)
temp534 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[534], ACTIVEJ.data$ACTIVEJ[534],temp533)
temp535 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[535], ACTIVEJ.data$ACTIVEJ[535],temp534)
temp536 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[536], ACTIVEJ.data$ACTIVEJ[536],temp535)
temp537 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[537], ACTIVEJ.data$ACTIVEJ[537],temp536)
temp538 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[538], ACTIVEJ.data$ACTIVEJ[538],temp537)
temp539 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[539], ACTIVEJ.data$ACTIVEJ[539],temp538)
temp540 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[540], ACTIVEJ.data$ACTIVEJ[540],temp539)
temp541 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[541], ACTIVEJ.data$ACTIVEJ[541],temp540)
temp542 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[542], ACTIVEJ.data$ACTIVEJ[542],temp541)
temp543 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[543], ACTIVEJ.data$ACTIVEJ[543],temp542)
temp544 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[544], ACTIVEJ.data$ACTIVEJ[544],temp543)
temp545 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[545], ACTIVEJ.data$ACTIVEJ[545],temp544)
temp546 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[546], ACTIVEJ.data$ACTIVEJ[546],temp545)
temp547 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[547], ACTIVEJ.data$ACTIVEJ[547],temp546)
temp548 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[548], ACTIVEJ.data$ACTIVEJ[548],temp547)
temp549 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[549], ACTIVEJ.data$ACTIVEJ[549],temp548)
temp550 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[550], ACTIVEJ.data$ACTIVEJ[550],temp549)
temp551 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[551], ACTIVEJ.data$ACTIVEJ[551],temp550)
temp552 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[552], ACTIVEJ.data$ACTIVEJ[552],temp551)
temp553 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[553], ACTIVEJ.data$ACTIVEJ[553],temp552)
temp554 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[554], ACTIVEJ.data$ACTIVEJ[554],temp553)
temp555 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[555], ACTIVEJ.data$ACTIVEJ[555],temp554)
temp556 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[556], ACTIVEJ.data$ACTIVEJ[556],temp555)
temp557 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[557], ACTIVEJ.data$ACTIVEJ[557],temp556)
temp558 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[558], ACTIVEJ.data$ACTIVEJ[558],temp557)
temp559 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[559], ACTIVEJ.data$ACTIVEJ[559],temp558)
temp560 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[560], ACTIVEJ.data$ACTIVEJ[560],temp559)
temp561 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[561], ACTIVEJ.data$ACTIVEJ[561],temp560)
temp562 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[562], ACTIVEJ.data$ACTIVEJ[562],temp561)
temp563 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[563], ACTIVEJ.data$ACTIVEJ[563],temp562)
temp564 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[564], ACTIVEJ.data$ACTIVEJ[564],temp563)
temp565 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[565], ACTIVEJ.data$ACTIVEJ[565],temp564)
temp566 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[566], ACTIVEJ.data$ACTIVEJ[566],temp565)
temp567 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[567], ACTIVEJ.data$ACTIVEJ[567],temp566)
temp568 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[568], ACTIVEJ.data$ACTIVEJ[568],temp567)
temp569 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[569], ACTIVEJ.data$ACTIVEJ[569],temp568)
temp570 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[570], ACTIVEJ.data$ACTIVEJ[570],temp569)
temp571 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[571], ACTIVEJ.data$ACTIVEJ[571],temp570)
temp572 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[572], ACTIVEJ.data$ACTIVEJ[572],temp571)
temp573 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[573], ACTIVEJ.data$ACTIVEJ[573],temp572)
temp574 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[574], ACTIVEJ.data$ACTIVEJ[574],temp573)
temp575 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[575], ACTIVEJ.data$ACTIVEJ[575],temp574)
temp576 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[576], ACTIVEJ.data$ACTIVEJ[576],temp575)
temp577 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[577], ACTIVEJ.data$ACTIVEJ[577],temp576)
temp578 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[578], ACTIVEJ.data$ACTIVEJ[578],temp577)
temp579 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[579], ACTIVEJ.data$ACTIVEJ[579],temp578)
temp580 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[580], ACTIVEJ.data$ACTIVEJ[580],temp579)
temp581 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[581], ACTIVEJ.data$ACTIVEJ[581],temp580)
temp582 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[582], ACTIVEJ.data$ACTIVEJ[582],temp581)
temp583 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[583], ACTIVEJ.data$ACTIVEJ[583],temp582)
temp584 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[584], ACTIVEJ.data$ACTIVEJ[584],temp583)
temp585 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[585], ACTIVEJ.data$ACTIVEJ[585],temp584)
temp586 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[586], ACTIVEJ.data$ACTIVEJ[586],temp585)
temp587 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[587], ACTIVEJ.data$ACTIVEJ[587],temp586)
temp588 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[588], ACTIVEJ.data$ACTIVEJ[588],temp587)
temp589 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[589], ACTIVEJ.data$ACTIVEJ[589],temp588)
temp590 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[590], ACTIVEJ.data$ACTIVEJ[590],temp589)
temp591 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[591], ACTIVEJ.data$ACTIVEJ[591],temp590)
temp592 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[592], ACTIVEJ.data$ACTIVEJ[592],temp591)
temp593 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[593], ACTIVEJ.data$ACTIVEJ[593],temp592)
temp594 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[594], ACTIVEJ.data$ACTIVEJ[594],temp593)
temp595 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[595], ACTIVEJ.data$ACTIVEJ[595],temp594)
temp596 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[596], ACTIVEJ.data$ACTIVEJ[596],temp595)
temp597 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[597], ACTIVEJ.data$ACTIVEJ[597],temp596)
temp598 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[598], ACTIVEJ.data$ACTIVEJ[598],temp597)
temp599 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[599], ACTIVEJ.data$ACTIVEJ[599],temp598)
temp600 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[600], ACTIVEJ.data$ACTIVEJ[600],temp599)
temp601 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[601], ACTIVEJ.data$ACTIVEJ[601],temp600)
temp602 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[602], ACTIVEJ.data$ACTIVEJ[602],temp601)
temp603 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[603], ACTIVEJ.data$ACTIVEJ[603],temp602)
temp604 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[604], ACTIVEJ.data$ACTIVEJ[604],temp603)
temp605 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[605], ACTIVEJ.data$ACTIVEJ[605],temp604)
temp606 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[606], ACTIVEJ.data$ACTIVEJ[606],temp605)
temp607 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[607], ACTIVEJ.data$ACTIVEJ[607],temp606)
temp608 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[608], ACTIVEJ.data$ACTIVEJ[608],temp607)
temp609 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[609], ACTIVEJ.data$ACTIVEJ[609],temp608)
temp610 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[610], ACTIVEJ.data$ACTIVEJ[610],temp609)
temp611 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[611], ACTIVEJ.data$ACTIVEJ[611],temp610)
temp612 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[612], ACTIVEJ.data$ACTIVEJ[612],temp611)
temp613 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[613], ACTIVEJ.data$ACTIVEJ[613],temp612)
temp614 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[614], ACTIVEJ.data$ACTIVEJ[614],temp613)
temp615 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[615], ACTIVEJ.data$ACTIVEJ[615],temp614)
temp616 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[616], ACTIVEJ.data$ACTIVEJ[616],temp615)
temp617 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[617], ACTIVEJ.data$ACTIVEJ[617],temp616)
temp618 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[618], ACTIVEJ.data$ACTIVEJ[618],temp617)
temp619 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[619], ACTIVEJ.data$ACTIVEJ[619],temp618)
temp620 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[620], ACTIVEJ.data$ACTIVEJ[620],temp619)
temp621 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[621], ACTIVEJ.data$ACTIVEJ[621],temp620)
temp622 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[622], ACTIVEJ.data$ACTIVEJ[622],temp621)
temp623 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[623], ACTIVEJ.data$ACTIVEJ[623],temp622)
temp624 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[624], ACTIVEJ.data$ACTIVEJ[624],temp623)
temp625 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[625], ACTIVEJ.data$ACTIVEJ[625],temp624)
temp626 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[626], ACTIVEJ.data$ACTIVEJ[626],temp625)
temp627 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[627], ACTIVEJ.data$ACTIVEJ[627],temp626)
temp628 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[628], ACTIVEJ.data$ACTIVEJ[628],temp627)
temp629 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[629], ACTIVEJ.data$ACTIVEJ[629],temp628)
temp630 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[630], ACTIVEJ.data$ACTIVEJ[630],temp629)
temp631 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[631], ACTIVEJ.data$ACTIVEJ[631],temp630)
temp632 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[632], ACTIVEJ.data$ACTIVEJ[632],temp631)
temp633 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[633], ACTIVEJ.data$ACTIVEJ[633],temp632)
temp634 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[634], ACTIVEJ.data$ACTIVEJ[634],temp633)
temp635 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[635], ACTIVEJ.data$ACTIVEJ[635],temp634)
temp636 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[636], ACTIVEJ.data$ACTIVEJ[636],temp635)
temp637 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[637], ACTIVEJ.data$ACTIVEJ[637],temp636)
temp638 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[638], ACTIVEJ.data$ACTIVEJ[638],temp637)
temp639 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[639], ACTIVEJ.data$ACTIVEJ[639],temp638)
temp640 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[640], ACTIVEJ.data$ACTIVEJ[640],temp639)
temp641 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[641], ACTIVEJ.data$ACTIVEJ[641],temp640)
temp642 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[642], ACTIVEJ.data$ACTIVEJ[642],temp641)
temp643 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[643], ACTIVEJ.data$ACTIVEJ[643],temp642)
temp644 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[644], ACTIVEJ.data$ACTIVEJ[644],temp643)
temp645 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[645], ACTIVEJ.data$ACTIVEJ[645],temp644)
temp646 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[646], ACTIVEJ.data$ACTIVEJ[646],temp645)
temp647 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[647], ACTIVEJ.data$ACTIVEJ[647],temp646)
temp648 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[648], ACTIVEJ.data$ACTIVEJ[648],temp647)
temp649 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[649], ACTIVEJ.data$ACTIVEJ[649],temp648)
temp650 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[650], ACTIVEJ.data$ACTIVEJ[650],temp649)
temp651 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[651], ACTIVEJ.data$ACTIVEJ[651],temp650)
temp652 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[652], ACTIVEJ.data$ACTIVEJ[652],temp651)
temp653 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[653], ACTIVEJ.data$ACTIVEJ[653],temp652)
temp654 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[654], ACTIVEJ.data$ACTIVEJ[654],temp653)
temp655 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[655], ACTIVEJ.data$ACTIVEJ[655],temp654)
temp656 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[656], ACTIVEJ.data$ACTIVEJ[656],temp655)
temp657 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[657], ACTIVEJ.data$ACTIVEJ[657],temp656)
temp658 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[658], ACTIVEJ.data$ACTIVEJ[658],temp657)
temp659 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[659], ACTIVEJ.data$ACTIVEJ[659],temp658)
temp660 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[660], ACTIVEJ.data$ACTIVEJ[660],temp659)
temp661 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[661], ACTIVEJ.data$ACTIVEJ[661],temp660)
temp662 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[662], ACTIVEJ.data$ACTIVEJ[662],temp661)
temp663 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[663], ACTIVEJ.data$ACTIVEJ[663],temp662)
temp664 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[664], ACTIVEJ.data$ACTIVEJ[664],temp663)
temp665 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[665], ACTIVEJ.data$ACTIVEJ[665],temp664)
temp666 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[666], ACTIVEJ.data$ACTIVEJ[666],temp665)
temp667 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[667], ACTIVEJ.data$ACTIVEJ[667],temp666)
temp668 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[668], ACTIVEJ.data$ACTIVEJ[668],temp667)
temp669 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[669], ACTIVEJ.data$ACTIVEJ[669],temp668)
temp670 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[670], ACTIVEJ.data$ACTIVEJ[670],temp669)
temp671 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[671], ACTIVEJ.data$ACTIVEJ[671],temp670)
temp672 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[672], ACTIVEJ.data$ACTIVEJ[672],temp671)
temp673 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[673], ACTIVEJ.data$ACTIVEJ[673],temp672)
temp674 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[674], ACTIVEJ.data$ACTIVEJ[674],temp673)
temp675 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[675], ACTIVEJ.data$ACTIVEJ[675],temp674)
temp676 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[676], ACTIVEJ.data$ACTIVEJ[676],temp675)
temp677 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[677], ACTIVEJ.data$ACTIVEJ[677],temp676)
temp678 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[678], ACTIVEJ.data$ACTIVEJ[678],temp677)
temp679 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[679], ACTIVEJ.data$ACTIVEJ[679],temp678)
temp680 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[680], ACTIVEJ.data$ACTIVEJ[680],temp679)
temp681 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[681], ACTIVEJ.data$ACTIVEJ[681],temp680)
temp682 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[682], ACTIVEJ.data$ACTIVEJ[682],temp681)
temp683 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[683], ACTIVEJ.data$ACTIVEJ[683],temp682)
temp684 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[684], ACTIVEJ.data$ACTIVEJ[684],temp683)
temp685 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[685], ACTIVEJ.data$ACTIVEJ[685],temp684)
temp686 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[686], ACTIVEJ.data$ACTIVEJ[686],temp685)
temp687 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[687], ACTIVEJ.data$ACTIVEJ[687],temp686)
temp688 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[688], ACTIVEJ.data$ACTIVEJ[688],temp687)
temp689 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[689], ACTIVEJ.data$ACTIVEJ[689],temp688)
temp690 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[690], ACTIVEJ.data$ACTIVEJ[690],temp689)
temp691 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[691], ACTIVEJ.data$ACTIVEJ[691],temp690)
temp692 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[692], ACTIVEJ.data$ACTIVEJ[692],temp691)
temp693 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[693], ACTIVEJ.data$ACTIVEJ[693],temp692)
temp694 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[694], ACTIVEJ.data$ACTIVEJ[694],temp693)
temp695 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[695], ACTIVEJ.data$ACTIVEJ[695],temp694)
temp696 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[696], ACTIVEJ.data$ACTIVEJ[696],temp695)
temp697 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[697], ACTIVEJ.data$ACTIVEJ[697],temp696)
temp698 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[698], ACTIVEJ.data$ACTIVEJ[698],temp697)
temp699 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[699], ACTIVEJ.data$ACTIVEJ[699],temp698)
temp700 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[700], ACTIVEJ.data$ACTIVEJ[700],temp699)
temp701 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[701], ACTIVEJ.data$ACTIVEJ[701],temp700)
temp702 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[702], ACTIVEJ.data$ACTIVEJ[702],temp701)
temp703 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[703], ACTIVEJ.data$ACTIVEJ[703],temp702)
temp704 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[704], ACTIVEJ.data$ACTIVEJ[704],temp703)
temp705 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[705], ACTIVEJ.data$ACTIVEJ[705],temp704)
temp706 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[706], ACTIVEJ.data$ACTIVEJ[706],temp705)
temp707 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[707], ACTIVEJ.data$ACTIVEJ[707],temp706)
temp708 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[708], ACTIVEJ.data$ACTIVEJ[708],temp707)
temp709 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[709], ACTIVEJ.data$ACTIVEJ[709],temp708)
temp710 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[710], ACTIVEJ.data$ACTIVEJ[710],temp709)
temp711 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[711], ACTIVEJ.data$ACTIVEJ[711],temp710)
temp712 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[712], ACTIVEJ.data$ACTIVEJ[712],temp711)
temp713 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[713], ACTIVEJ.data$ACTIVEJ[713],temp712)
temp714 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[714], ACTIVEJ.data$ACTIVEJ[714],temp713)
temp715 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[715], ACTIVEJ.data$ACTIVEJ[715],temp714)
temp716 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[716], ACTIVEJ.data$ACTIVEJ[716],temp715)
temp717 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[717], ACTIVEJ.data$ACTIVEJ[717],temp716)
temp718 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[718], ACTIVEJ.data$ACTIVEJ[718],temp717)
temp719 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[719], ACTIVEJ.data$ACTIVEJ[719],temp718)
temp720 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[720], ACTIVEJ.data$ACTIVEJ[720],temp719)
temp721 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[721], ACTIVEJ.data$ACTIVEJ[721],temp720)
temp722 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[722], ACTIVEJ.data$ACTIVEJ[722],temp721)
temp723 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[723], ACTIVEJ.data$ACTIVEJ[723],temp722)
temp724 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[724], ACTIVEJ.data$ACTIVEJ[724],temp723)
temp725 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[725], ACTIVEJ.data$ACTIVEJ[725],temp724)
temp726 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[726], ACTIVEJ.data$ACTIVEJ[726],temp725)
temp727 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[727], ACTIVEJ.data$ACTIVEJ[727],temp726)
temp728 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[728], ACTIVEJ.data$ACTIVEJ[728],temp727)
temp729 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[729], ACTIVEJ.data$ACTIVEJ[729],temp728)
temp730 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[730], ACTIVEJ.data$ACTIVEJ[730],temp729)
temp731 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[731], ACTIVEJ.data$ACTIVEJ[731],temp730)
temp732 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[732], ACTIVEJ.data$ACTIVEJ[732],temp731)
temp733 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[733], ACTIVEJ.data$ACTIVEJ[733],temp732)
temp734 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[734], ACTIVEJ.data$ACTIVEJ[734],temp733)
temp735 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[735], ACTIVEJ.data$ACTIVEJ[735],temp734)
temp736 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[736], ACTIVEJ.data$ACTIVEJ[736],temp735)
temp737 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[737], ACTIVEJ.data$ACTIVEJ[737],temp736)
temp738 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[738], ACTIVEJ.data$ACTIVEJ[738],temp737)
temp739 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[739], ACTIVEJ.data$ACTIVEJ[739],temp738)
temp740 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[740], ACTIVEJ.data$ACTIVEJ[740],temp739)
temp741 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[741], ACTIVEJ.data$ACTIVEJ[741],temp740)
temp742 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[742], ACTIVEJ.data$ACTIVEJ[742],temp741)
temp743 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[743], ACTIVEJ.data$ACTIVEJ[743],temp742)
temp744 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[744], ACTIVEJ.data$ACTIVEJ[744],temp743)
temp745 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[745], ACTIVEJ.data$ACTIVEJ[745],temp744)
temp746 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[746], ACTIVEJ.data$ACTIVEJ[746],temp745)
temp747 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[747], ACTIVEJ.data$ACTIVEJ[747],temp746)
temp748 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[748], ACTIVEJ.data$ACTIVEJ[748],temp747)
temp749 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[749], ACTIVEJ.data$ACTIVEJ[749],temp748)
temp750 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[750], ACTIVEJ.data$ACTIVEJ[750],temp749)
temp751 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[751], ACTIVEJ.data$ACTIVEJ[751],temp750)
temp752 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[752], ACTIVEJ.data$ACTIVEJ[752],temp751)
temp753 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[753], ACTIVEJ.data$ACTIVEJ[753],temp752)
temp754 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[754], ACTIVEJ.data$ACTIVEJ[754],temp753)
temp755 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[755], ACTIVEJ.data$ACTIVEJ[755],temp754)
temp756 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[756], ACTIVEJ.data$ACTIVEJ[756],temp755)
temp757 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[757], ACTIVEJ.data$ACTIVEJ[757],temp756)
temp758 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[758], ACTIVEJ.data$ACTIVEJ[758],temp757)
temp759 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[759], ACTIVEJ.data$ACTIVEJ[759],temp758)
temp760 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[760], ACTIVEJ.data$ACTIVEJ[760],temp759)
temp761 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[761], ACTIVEJ.data$ACTIVEJ[761],temp760)
temp762 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[762], ACTIVEJ.data$ACTIVEJ[762],temp761)
temp763 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[763], ACTIVEJ.data$ACTIVEJ[763],temp762)
temp764 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[764], ACTIVEJ.data$ACTIVEJ[764],temp763)
temp765 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[765], ACTIVEJ.data$ACTIVEJ[765],temp764)
temp766 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[766], ACTIVEJ.data$ACTIVEJ[766],temp765)
temp767 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[767], ACTIVEJ.data$ACTIVEJ[767],temp766)
temp768 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[768], ACTIVEJ.data$ACTIVEJ[768],temp767)
temp769 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[769], ACTIVEJ.data$ACTIVEJ[769],temp768)
temp770 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[770], ACTIVEJ.data$ACTIVEJ[770],temp769)
temp771 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[771], ACTIVEJ.data$ACTIVEJ[771],temp770)
temp772 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[772], ACTIVEJ.data$ACTIVEJ[772],temp771)
temp773 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[773], ACTIVEJ.data$ACTIVEJ[773],temp772)
temp774 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[774], ACTIVEJ.data$ACTIVEJ[774],temp773)
temp775 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[775], ACTIVEJ.data$ACTIVEJ[775],temp774)
temp776 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[776], ACTIVEJ.data$ACTIVEJ[776],temp775)
temp777 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[777], ACTIVEJ.data$ACTIVEJ[777],temp776)
temp778 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[778], ACTIVEJ.data$ACTIVEJ[778],temp777)
temp779 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[779], ACTIVEJ.data$ACTIVEJ[779],temp778)
temp780 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[780], ACTIVEJ.data$ACTIVEJ[780],temp779)
temp781 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[781], ACTIVEJ.data$ACTIVEJ[781],temp780)
temp782 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[782], ACTIVEJ.data$ACTIVEJ[782],temp781)
temp783 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[783], ACTIVEJ.data$ACTIVEJ[783],temp782)
temp784 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[784], ACTIVEJ.data$ACTIVEJ[784],temp783)
temp785 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[785], ACTIVEJ.data$ACTIVEJ[785],temp784)
temp786 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[786], ACTIVEJ.data$ACTIVEJ[786],temp785)
temp787 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[787], ACTIVEJ.data$ACTIVEJ[787],temp786)
temp788 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[788], ACTIVEJ.data$ACTIVEJ[788],temp787)
temp789 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[789], ACTIVEJ.data$ACTIVEJ[789],temp788)
temp790 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[790], ACTIVEJ.data$ACTIVEJ[790],temp789)
temp791 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[791], ACTIVEJ.data$ACTIVEJ[791],temp790)
temp792 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[792], ACTIVEJ.data$ACTIVEJ[792],temp791)
temp793 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[793], ACTIVEJ.data$ACTIVEJ[793],temp792)
temp794 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[794], ACTIVEJ.data$ACTIVEJ[794],temp793)
temp795 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[795], ACTIVEJ.data$ACTIVEJ[795],temp794)
temp796 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[796], ACTIVEJ.data$ACTIVEJ[796],temp795)
temp797 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[797], ACTIVEJ.data$ACTIVEJ[797],temp796)
temp798 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[798], ACTIVEJ.data$ACTIVEJ[798],temp797)
temp799 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[799], ACTIVEJ.data$ACTIVEJ[799],temp798)
temp800 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[800], ACTIVEJ.data$ACTIVEJ[800],temp799)
temp801 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[801], ACTIVEJ.data$ACTIVEJ[801],temp800)
temp802 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[802], ACTIVEJ.data$ACTIVEJ[802],temp801)
temp803 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[803], ACTIVEJ.data$ACTIVEJ[803],temp802)
temp804 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[804], ACTIVEJ.data$ACTIVEJ[804],temp803)
temp805 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[805], ACTIVEJ.data$ACTIVEJ[805],temp804)
temp806 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[806], ACTIVEJ.data$ACTIVEJ[806],temp805)
temp807 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[807], ACTIVEJ.data$ACTIVEJ[807],temp806)
temp808 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[808], ACTIVEJ.data$ACTIVEJ[808],temp807)
temp809 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[809], ACTIVEJ.data$ACTIVEJ[809],temp808)
temp810 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[810], ACTIVEJ.data$ACTIVEJ[810],temp809)
temp811 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[811], ACTIVEJ.data$ACTIVEJ[811],temp810)
temp812 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[812], ACTIVEJ.data$ACTIVEJ[812],temp811)
temp813 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[813], ACTIVEJ.data$ACTIVEJ[813],temp812)
temp814 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[814], ACTIVEJ.data$ACTIVEJ[814],temp813)
temp815 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[815], ACTIVEJ.data$ACTIVEJ[815],temp814)
temp816 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[816], ACTIVEJ.data$ACTIVEJ[816],temp815)
temp817 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[817], ACTIVEJ.data$ACTIVEJ[817],temp816)
temp818 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[818], ACTIVEJ.data$ACTIVEJ[818],temp817)
temp819 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[819], ACTIVEJ.data$ACTIVEJ[819],temp818)
temp820 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[820], ACTIVEJ.data$ACTIVEJ[820],temp819)
temp821 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[821], ACTIVEJ.data$ACTIVEJ[821],temp820)
temp822 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[822], ACTIVEJ.data$ACTIVEJ[822],temp821)
temp823 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[823], ACTIVEJ.data$ACTIVEJ[823],temp822)
temp824 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[824], ACTIVEJ.data$ACTIVEJ[824],temp823)
temp825 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[825], ACTIVEJ.data$ACTIVEJ[825],temp824)
temp826 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[826], ACTIVEJ.data$ACTIVEJ[826],temp825)
temp827 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[827], ACTIVEJ.data$ACTIVEJ[827],temp826)
temp828 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[828], ACTIVEJ.data$ACTIVEJ[828],temp827)
temp829 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[829], ACTIVEJ.data$ACTIVEJ[829],temp828)
temp830 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[830], ACTIVEJ.data$ACTIVEJ[830],temp829)
temp831 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[831], ACTIVEJ.data$ACTIVEJ[831],temp830)
temp832 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[832], ACTIVEJ.data$ACTIVEJ[832],temp831)
temp833 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[833], ACTIVEJ.data$ACTIVEJ[833],temp832)
temp834 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[834], ACTIVEJ.data$ACTIVEJ[834],temp833)
temp835 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[835], ACTIVEJ.data$ACTIVEJ[835],temp834)
temp836 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[836], ACTIVEJ.data$ACTIVEJ[836],temp835)
temp837 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[837], ACTIVEJ.data$ACTIVEJ[837],temp836)
temp838 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[838], ACTIVEJ.data$ACTIVEJ[838],temp837)
temp839 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[839], ACTIVEJ.data$ACTIVEJ[839],temp838)
temp840 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[840], ACTIVEJ.data$ACTIVEJ[840],temp839)
temp841 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[841], ACTIVEJ.data$ACTIVEJ[841],temp840)
temp842 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[842], ACTIVEJ.data$ACTIVEJ[842],temp841)
temp843 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[843], ACTIVEJ.data$ACTIVEJ[843],temp842)
temp844 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[844], ACTIVEJ.data$ACTIVEJ[844],temp843)
temp845 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[845], ACTIVEJ.data$ACTIVEJ[845],temp844)
temp846 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[846], ACTIVEJ.data$ACTIVEJ[846],temp845)
temp847 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[847], ACTIVEJ.data$ACTIVEJ[847],temp846)
temp848 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[848], ACTIVEJ.data$ACTIVEJ[848],temp847)
temp849 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[849], ACTIVEJ.data$ACTIVEJ[849],temp848)
temp850 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[850], ACTIVEJ.data$ACTIVEJ[850],temp849)
temp851 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[851], ACTIVEJ.data$ACTIVEJ[851],temp850)
temp852 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[852], ACTIVEJ.data$ACTIVEJ[852],temp851)
temp853 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[853], ACTIVEJ.data$ACTIVEJ[853],temp852)
temp854 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[854], ACTIVEJ.data$ACTIVEJ[854],temp853)
temp855 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[855], ACTIVEJ.data$ACTIVEJ[855],temp854)
temp856 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[856], ACTIVEJ.data$ACTIVEJ[856],temp855)
temp857 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[857], ACTIVEJ.data$ACTIVEJ[857],temp856)
temp858 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[858], ACTIVEJ.data$ACTIVEJ[858],temp857)
temp859 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[859], ACTIVEJ.data$ACTIVEJ[859],temp858)
temp860 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[860], ACTIVEJ.data$ACTIVEJ[860],temp859)
temp861 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[861], ACTIVEJ.data$ACTIVEJ[861],temp860)
temp862 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[862], ACTIVEJ.data$ACTIVEJ[862],temp861)
temp863 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[863], ACTIVEJ.data$ACTIVEJ[863],temp862)
temp864 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[864], ACTIVEJ.data$ACTIVEJ[864],temp863)
temp865 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[865], ACTIVEJ.data$ACTIVEJ[865],temp864)
temp866 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[866], ACTIVEJ.data$ACTIVEJ[866],temp865)
temp867 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[867], ACTIVEJ.data$ACTIVEJ[867],temp866)
temp868 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[868], ACTIVEJ.data$ACTIVEJ[868],temp867)
temp869 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[869], ACTIVEJ.data$ACTIVEJ[869],temp868)
temp870 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[870], ACTIVEJ.data$ACTIVEJ[870],temp869)
temp871 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[871], ACTIVEJ.data$ACTIVEJ[871],temp870)
temp872 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[872], ACTIVEJ.data$ACTIVEJ[872],temp871)
temp873 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[873], ACTIVEJ.data$ACTIVEJ[873],temp872)
temp874 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[874], ACTIVEJ.data$ACTIVEJ[874],temp873)
temp875 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[875], ACTIVEJ.data$ACTIVEJ[875],temp874)
temp876 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[876], ACTIVEJ.data$ACTIVEJ[876],temp875)
temp877 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[877], ACTIVEJ.data$ACTIVEJ[877],temp876)
temp878 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[878], ACTIVEJ.data$ACTIVEJ[878],temp877)
temp879 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[879], ACTIVEJ.data$ACTIVEJ[879],temp878)
temp880 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[880], ACTIVEJ.data$ACTIVEJ[880],temp879)
temp881 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[881], ACTIVEJ.data$ACTIVEJ[881],temp880)
temp882 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[882], ACTIVEJ.data$ACTIVEJ[882],temp881)
temp883 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[883], ACTIVEJ.data$ACTIVEJ[883],temp882)
temp884 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[884], ACTIVEJ.data$ACTIVEJ[884],temp883)
temp885 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[885], ACTIVEJ.data$ACTIVEJ[885],temp884)
temp886 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[886], ACTIVEJ.data$ACTIVEJ[886],temp885)
temp887 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[887], ACTIVEJ.data$ACTIVEJ[887],temp886)
temp888 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[888], ACTIVEJ.data$ACTIVEJ[888],temp887)
temp889 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[889], ACTIVEJ.data$ACTIVEJ[889],temp888)
temp890 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[890], ACTIVEJ.data$ACTIVEJ[890],temp889)
temp891 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[891], ACTIVEJ.data$ACTIVEJ[891],temp890)
temp892 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[892], ACTIVEJ.data$ACTIVEJ[892],temp891)
temp893 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[893], ACTIVEJ.data$ACTIVEJ[893],temp892)
temp894 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[894], ACTIVEJ.data$ACTIVEJ[894],temp893)
temp895 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[895], ACTIVEJ.data$ACTIVEJ[895],temp894)
temp896 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[896], ACTIVEJ.data$ACTIVEJ[896],temp895)
temp897 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[897], ACTIVEJ.data$ACTIVEJ[897],temp896)
temp898 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[898], ACTIVEJ.data$ACTIVEJ[898],temp897)
temp899 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[899], ACTIVEJ.data$ACTIVEJ[899],temp898)
temp900 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[900], ACTIVEJ.data$ACTIVEJ[900],temp899)
temp901 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[901], ACTIVEJ.data$ACTIVEJ[901],temp900)
temp902 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[902], ACTIVEJ.data$ACTIVEJ[902],temp901)
temp903 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[903], ACTIVEJ.data$ACTIVEJ[903],temp902)
temp904 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[904], ACTIVEJ.data$ACTIVEJ[904],temp903)
temp905 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[905], ACTIVEJ.data$ACTIVEJ[905],temp904)
temp906 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[906], ACTIVEJ.data$ACTIVEJ[906],temp905)
temp907 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[907], ACTIVEJ.data$ACTIVEJ[907],temp906)
temp908 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[908], ACTIVEJ.data$ACTIVEJ[908],temp907)
temp909 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[909], ACTIVEJ.data$ACTIVEJ[909],temp908)
temp910 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[910], ACTIVEJ.data$ACTIVEJ[910],temp909)
temp911 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[911], ACTIVEJ.data$ACTIVEJ[911],temp910)
temp912 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[912], ACTIVEJ.data$ACTIVEJ[912],temp911)
temp913 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[913], ACTIVEJ.data$ACTIVEJ[913],temp912)
temp914 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[914], ACTIVEJ.data$ACTIVEJ[914],temp913)
temp915 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[915], ACTIVEJ.data$ACTIVEJ[915],temp914)
temp916 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[916], ACTIVEJ.data$ACTIVEJ[916],temp915)
temp917 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[917], ACTIVEJ.data$ACTIVEJ[917],temp916)
temp918 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[918], ACTIVEJ.data$ACTIVEJ[918],temp917)
temp919 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[919], ACTIVEJ.data$ACTIVEJ[919],temp918)
temp920 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[920], ACTIVEJ.data$ACTIVEJ[920],temp919)
temp921 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[921], ACTIVEJ.data$ACTIVEJ[921],temp920)
temp922 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[922], ACTIVEJ.data$ACTIVEJ[922],temp921)
temp923 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[923], ACTIVEJ.data$ACTIVEJ[923],temp922)
temp924 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[924], ACTIVEJ.data$ACTIVEJ[924],temp923)
temp925 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[925], ACTIVEJ.data$ACTIVEJ[925],temp924)
temp926 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[926], ACTIVEJ.data$ACTIVEJ[926],temp925)
temp927 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[927], ACTIVEJ.data$ACTIVEJ[927],temp926)
temp928 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[928], ACTIVEJ.data$ACTIVEJ[928],temp927)
temp929 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[929], ACTIVEJ.data$ACTIVEJ[929],temp928)
temp930 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[930], ACTIVEJ.data$ACTIVEJ[930],temp929)
temp931 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[931], ACTIVEJ.data$ACTIVEJ[931],temp930)
temp932 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[932], ACTIVEJ.data$ACTIVEJ[932],temp931)
temp933 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[933], ACTIVEJ.data$ACTIVEJ[933],temp932)
temp934 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[934], ACTIVEJ.data$ACTIVEJ[934],temp933)
temp935 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[935], ACTIVEJ.data$ACTIVEJ[935],temp934)
temp936 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[936], ACTIVEJ.data$ACTIVEJ[936],temp935)
temp937 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[937], ACTIVEJ.data$ACTIVEJ[937],temp936)
temp938 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[938], ACTIVEJ.data$ACTIVEJ[938],temp937)
temp939 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[939], ACTIVEJ.data$ACTIVEJ[939],temp938)
temp940 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[940], ACTIVEJ.data$ACTIVEJ[940],temp939)
temp941 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[941], ACTIVEJ.data$ACTIVEJ[941],temp940)
temp942 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[942], ACTIVEJ.data$ACTIVEJ[942],temp941)
temp943 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[943], ACTIVEJ.data$ACTIVEJ[943],temp942)
temp944 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[944], ACTIVEJ.data$ACTIVEJ[944],temp943)
temp945 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[945], ACTIVEJ.data$ACTIVEJ[945],temp944)
temp946 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[946], ACTIVEJ.data$ACTIVEJ[946],temp945)
temp947 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[947], ACTIVEJ.data$ACTIVEJ[947],temp946)
temp948 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[948], ACTIVEJ.data$ACTIVEJ[948],temp947)
temp949 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[949], ACTIVEJ.data$ACTIVEJ[949],temp948)
temp950 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[950], ACTIVEJ.data$ACTIVEJ[950],temp949)
temp951 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[951], ACTIVEJ.data$ACTIVEJ[951],temp950)
temp952 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[952], ACTIVEJ.data$ACTIVEJ[952],temp951)
temp953 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[953], ACTIVEJ.data$ACTIVEJ[953],temp952)
temp954 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[954], ACTIVEJ.data$ACTIVEJ[954],temp953)
temp955 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[955], ACTIVEJ.data$ACTIVEJ[955],temp954)
temp956 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[956], ACTIVEJ.data$ACTIVEJ[956],temp955)
temp957 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[957], ACTIVEJ.data$ACTIVEJ[957],temp956)
temp958 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[958], ACTIVEJ.data$ACTIVEJ[958],temp957)
temp959 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[959], ACTIVEJ.data$ACTIVEJ[959],temp958)
temp960 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[960], ACTIVEJ.data$ACTIVEJ[960],temp959)
temp961 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[961], ACTIVEJ.data$ACTIVEJ[961],temp960)
temp962 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[962], ACTIVEJ.data$ACTIVEJ[962],temp961)
temp963 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[963], ACTIVEJ.data$ACTIVEJ[963],temp962)
temp964 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[964], ACTIVEJ.data$ACTIVEJ[964],temp963)
temp965 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[965], ACTIVEJ.data$ACTIVEJ[965],temp964)
temp966 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[966], ACTIVEJ.data$ACTIVEJ[966],temp965)
temp967 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[967], ACTIVEJ.data$ACTIVEJ[967],temp966)
temp968 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[968], ACTIVEJ.data$ACTIVEJ[968],temp967)
temp969 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[969], ACTIVEJ.data$ACTIVEJ[969],temp968)
temp970 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[970], ACTIVEJ.data$ACTIVEJ[970],temp969)
temp971 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[971], ACTIVEJ.data$ACTIVEJ[971],temp970)
temp972 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[972], ACTIVEJ.data$ACTIVEJ[972],temp971)
temp973 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[973], ACTIVEJ.data$ACTIVEJ[973],temp972)
temp974 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[974], ACTIVEJ.data$ACTIVEJ[974],temp973)
temp975 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[975], ACTIVEJ.data$ACTIVEJ[975],temp974)
temp976 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[976], ACTIVEJ.data$ACTIVEJ[976],temp975)
temp977 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[977], ACTIVEJ.data$ACTIVEJ[977],temp976)
temp978 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[978], ACTIVEJ.data$ACTIVEJ[978],temp977)
temp979 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[979], ACTIVEJ.data$ACTIVEJ[979],temp978)
temp980 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[980], ACTIVEJ.data$ACTIVEJ[980],temp979)
temp981 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[981], ACTIVEJ.data$ACTIVEJ[981],temp980)
temp982 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[982], ACTIVEJ.data$ACTIVEJ[982],temp981)
temp983 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[983], ACTIVEJ.data$ACTIVEJ[983],temp982)
temp984 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[984], ACTIVEJ.data$ACTIVEJ[984],temp983)
temp985 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[985], ACTIVEJ.data$ACTIVEJ[985],temp984)
temp986 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[986], ACTIVEJ.data$ACTIVEJ[986],temp985)
temp987 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[987], ACTIVEJ.data$ACTIVEJ[987],temp986)
temp988 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[988], ACTIVEJ.data$ACTIVEJ[988],temp987)
temp989 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[989], ACTIVEJ.data$ACTIVEJ[989],temp988)
temp990 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[990], ACTIVEJ.data$ACTIVEJ[990],temp989)
temp991 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[991], ACTIVEJ.data$ACTIVEJ[991],temp990)
temp992 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[992], ACTIVEJ.data$ACTIVEJ[992],temp991)
temp993 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[993], ACTIVEJ.data$ACTIVEJ[993],temp992)
temp994 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[994], ACTIVEJ.data$ACTIVEJ[994],temp993)
temp995 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[995], ACTIVEJ.data$ACTIVEJ[995],temp994)
temp996 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[996], ACTIVEJ.data$ACTIVEJ[996],temp995)
temp997 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[997], ACTIVEJ.data$ACTIVEJ[997],temp996)
temp998 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[998], ACTIVEJ.data$ACTIVEJ[998],temp997)
temp999 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[999], ACTIVEJ.data$ACTIVEJ[999],temp998)
temp1000 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1000], ACTIVEJ.data$ACTIVEJ[1000],temp999)
temp1001 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1001], ACTIVEJ.data$ACTIVEJ[1001],temp1000)
temp1002 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1002], ACTIVEJ.data$ACTIVEJ[1002],temp1001)
temp1003 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1003], ACTIVEJ.data$ACTIVEJ[1003],temp1002)
temp1004 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1004], ACTIVEJ.data$ACTIVEJ[1004],temp1003)
temp1005 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1005], ACTIVEJ.data$ACTIVEJ[1005],temp1004)
temp1006 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1006], ACTIVEJ.data$ACTIVEJ[1006],temp1005)
temp1007 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1007], ACTIVEJ.data$ACTIVEJ[1007],temp1006)
temp1008 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1008], ACTIVEJ.data$ACTIVEJ[1008],temp1007)
temp1009 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1009], ACTIVEJ.data$ACTIVEJ[1009],temp1008)
temp1010 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1010], ACTIVEJ.data$ACTIVEJ[1010],temp1009)
temp1011 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1011], ACTIVEJ.data$ACTIVEJ[1011],temp1010)
temp1012 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1012], ACTIVEJ.data$ACTIVEJ[1012],temp1011)
temp1013 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1013], ACTIVEJ.data$ACTIVEJ[1013],temp1012)
temp1014 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1014], ACTIVEJ.data$ACTIVEJ[1014],temp1013)
temp1015 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1015], ACTIVEJ.data$ACTIVEJ[1015],temp1014)
temp1016 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1016], ACTIVEJ.data$ACTIVEJ[1016],temp1015)
temp1017 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1017], ACTIVEJ.data$ACTIVEJ[1017],temp1016)
temp1018 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1018], ACTIVEJ.data$ACTIVEJ[1018],temp1017)
temp1019 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1019], ACTIVEJ.data$ACTIVEJ[1019],temp1018)
temp1020 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1020], ACTIVEJ.data$ACTIVEJ[1020],temp1019)
temp1021 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1021], ACTIVEJ.data$ACTIVEJ[1021],temp1020)
temp1022 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1022], ACTIVEJ.data$ACTIVEJ[1022],temp1021)
temp1023 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1023], ACTIVEJ.data$ACTIVEJ[1023],temp1022)
temp1024 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1024], ACTIVEJ.data$ACTIVEJ[1024],temp1023)
temp1025 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1025], ACTIVEJ.data$ACTIVEJ[1025],temp1024)
temp1026 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1026], ACTIVEJ.data$ACTIVEJ[1026],temp1025)
temp1027 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1027], ACTIVEJ.data$ACTIVEJ[1027],temp1026)
temp1028 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1028], ACTIVEJ.data$ACTIVEJ[1028],temp1027)
temp1029 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1029], ACTIVEJ.data$ACTIVEJ[1029],temp1028)
temp1030 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1030], ACTIVEJ.data$ACTIVEJ[1030],temp1029)
temp1031 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1031], ACTIVEJ.data$ACTIVEJ[1031],temp1030)
temp1032 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1032], ACTIVEJ.data$ACTIVEJ[1032],temp1031)
temp1033 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1033], ACTIVEJ.data$ACTIVEJ[1033],temp1032)
temp1034 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1034], ACTIVEJ.data$ACTIVEJ[1034],temp1033)
temp1035 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1035], ACTIVEJ.data$ACTIVEJ[1035],temp1034)
temp1036 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1036], ACTIVEJ.data$ACTIVEJ[1036],temp1035)
temp1037 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1037], ACTIVEJ.data$ACTIVEJ[1037],temp1036)
temp1038 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1038], ACTIVEJ.data$ACTIVEJ[1038],temp1037)
temp1039 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1039], ACTIVEJ.data$ACTIVEJ[1039],temp1038)
temp1040 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1040], ACTIVEJ.data$ACTIVEJ[1040],temp1039)
temp1041 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1041], ACTIVEJ.data$ACTIVEJ[1041],temp1040)
temp1042 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1042], ACTIVEJ.data$ACTIVEJ[1042],temp1041)
temp1043 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1043], ACTIVEJ.data$ACTIVEJ[1043],temp1042)
temp1044 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1044], ACTIVEJ.data$ACTIVEJ[1044],temp1043)
temp1045 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1045], ACTIVEJ.data$ACTIVEJ[1045],temp1044)
temp1046 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1046], ACTIVEJ.data$ACTIVEJ[1046],temp1045)
temp1047 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1047], ACTIVEJ.data$ACTIVEJ[1047],temp1046)
temp1048 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1048], ACTIVEJ.data$ACTIVEJ[1048],temp1047)
temp1049 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1049], ACTIVEJ.data$ACTIVEJ[1049],temp1048)
temp1050 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1050], ACTIVEJ.data$ACTIVEJ[1050],temp1049)
temp1051 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1051], ACTIVEJ.data$ACTIVEJ[1051],temp1050)
temp1052 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1052], ACTIVEJ.data$ACTIVEJ[1052],temp1051)
temp1053 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1053], ACTIVEJ.data$ACTIVEJ[1053],temp1052)
temp1054 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1054], ACTIVEJ.data$ACTIVEJ[1054],temp1053)
temp1055 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1055], ACTIVEJ.data$ACTIVEJ[1055],temp1054)
temp1056 <- ifelse(clean.data$JUDGQYCIRCUIT == ACTIVEJ.data$JUDGQYCIRCUIT[1056], ACTIVEJ.data$ACTIVEJ[1056],temp1055)

clean.data$ACTIVEJ <- temp1056

##Adding number of cases on docket per quarter data:

docket <- as.data.frame(table(clean.data$JUDGQYCIRCUIT))
colnames(docket) <-c ("JUDGQYCIRCUIT", "CASES")

clean.data$JUDGQYDOCKET <- rep(NA,nrow(clean.data))

temp1 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[1], docket$CASES[1],clean.data$JUDGQYDOCKET)
temp2 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[2], docket$CASES[2],temp1)
temp3 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[3], docket$CASES[3],temp2)
temp4 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[4], docket$CASES[4],temp3)
temp5 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[5], docket$CASES[5],temp4)
temp6 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[6], docket$CASES[6],temp5)
temp7 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[7], docket$CASES[7],temp6)
temp8 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[8], docket$CASES[8],temp7)
temp9 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[9], docket$CASES[9],temp8)
temp10 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[10], docket$CASES[10],temp9)
temp11 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[11], docket$CASES[11],temp10)
temp12 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[12], docket$CASES[12],temp11)
temp13 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[13], docket$CASES[13],temp12)
temp14 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[14], docket$CASES[14],temp13)
temp15 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[15], docket$CASES[15],temp14)
temp16 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[16], docket$CASES[16],temp15)
temp17 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[17], docket$CASES[17],temp16)
temp18 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[18], docket$CASES[18],temp17)
temp19 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[19], docket$CASES[19],temp18)
temp20 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[20], docket$CASES[20],temp19)
temp21 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[21], docket$CASES[21],temp20)
temp22 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[22], docket$CASES[22],temp21)
temp23 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[23], docket$CASES[23],temp22)
temp24 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[24], docket$CASES[24],temp23)
temp25 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[25], docket$CASES[25],temp24)
temp26 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[26], docket$CASES[26],temp25)
temp27 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[27], docket$CASES[27],temp26)
temp28 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[28], docket$CASES[28],temp27)
temp29 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[29], docket$CASES[29],temp28)
temp30 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[30], docket$CASES[30],temp29)
temp31 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[31], docket$CASES[31],temp30)
temp32 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[32], docket$CASES[32],temp31)
temp33 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[33], docket$CASES[33],temp32)
temp34 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[34], docket$CASES[34],temp33)
temp35 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[35], docket$CASES[35],temp34)
temp36 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[36], docket$CASES[36],temp35)
temp37 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[37], docket$CASES[37],temp36)
temp38 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[38], docket$CASES[38],temp37)
temp39 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[39], docket$CASES[39],temp38)
temp40 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[40], docket$CASES[40],temp39)
temp41 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[41], docket$CASES[41],temp40)
temp42 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[42], docket$CASES[42],temp41)
temp43 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[43], docket$CASES[43],temp42)
temp44 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[44], docket$CASES[44],temp43)
temp45 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[45], docket$CASES[45],temp44)
temp46 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[46], docket$CASES[46],temp45)
temp47 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[47], docket$CASES[47],temp46)
temp48 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[48], docket$CASES[48],temp47)
temp49 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[49], docket$CASES[49],temp48)
temp50 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[50], docket$CASES[50],temp49)
temp51 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[51], docket$CASES[51],temp50)
temp52 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[52], docket$CASES[52],temp51)
temp53 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[53], docket$CASES[53],temp52)
temp54 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[54], docket$CASES[54],temp53)
temp55 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[55], docket$CASES[55],temp54)
temp56 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[56], docket$CASES[56],temp55)
temp57 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[57], docket$CASES[57],temp56)
temp58 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[58], docket$CASES[58],temp57)
temp59 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[59], docket$CASES[59],temp58)
temp60 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[60], docket$CASES[60],temp59)
temp61 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[61], docket$CASES[61],temp60)
temp62 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[62], docket$CASES[62],temp61)
temp63 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[63], docket$CASES[63],temp62)
temp64 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[64], docket$CASES[64],temp63)
temp65 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[65], docket$CASES[65],temp64)
temp66 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[66], docket$CASES[66],temp65)
temp67 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[67], docket$CASES[67],temp66)
temp68 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[68], docket$CASES[68],temp67)
temp69 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[69], docket$CASES[69],temp68)
temp70 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[70], docket$CASES[70],temp69)
temp71 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[71], docket$CASES[71],temp70)
temp72 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[72], docket$CASES[72],temp71)
temp73 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[73], docket$CASES[73],temp72)
temp74 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[74], docket$CASES[74],temp73)
temp75 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[75], docket$CASES[75],temp74)
temp76 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[76], docket$CASES[76],temp75)
temp77 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[77], docket$CASES[77],temp76)
temp78 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[78], docket$CASES[78],temp77)
temp79 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[79], docket$CASES[79],temp78)
temp80 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[80], docket$CASES[80],temp79)
temp81 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[81], docket$CASES[81],temp80)
temp82 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[82], docket$CASES[82],temp81)
temp83 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[83], docket$CASES[83],temp82)
temp84 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[84], docket$CASES[84],temp83)
temp85 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[85], docket$CASES[85],temp84)
temp86 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[86], docket$CASES[86],temp85)
temp87 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[87], docket$CASES[87],temp86)
temp88 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[88], docket$CASES[88],temp87)
temp89 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[89], docket$CASES[89],temp88)
temp90 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[90], docket$CASES[90],temp89)
temp91 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[91], docket$CASES[91],temp90)
temp92 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[92], docket$CASES[92],temp91)
temp93 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[93], docket$CASES[93],temp92)
temp94 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[94], docket$CASES[94],temp93)
temp95 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[95], docket$CASES[95],temp94)
temp96 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[96], docket$CASES[96],temp95)
temp97 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[97], docket$CASES[97],temp96)
temp98 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[98], docket$CASES[98],temp97)
temp99 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[99], docket$CASES[99],temp98)
temp100 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[100], docket$CASES[100],temp99)
temp101 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[101], docket$CASES[101],temp100)
temp102 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[102], docket$CASES[102],temp101)
temp103 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[103], docket$CASES[103],temp102)
temp104 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[104], docket$CASES[104],temp103)
temp105 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[105], docket$CASES[105],temp104)
temp106 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[106], docket$CASES[106],temp105)
temp107 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[107], docket$CASES[107],temp106)
temp108 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[108], docket$CASES[108],temp107)
temp109 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[109], docket$CASES[109],temp108)
temp110 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[110], docket$CASES[110],temp109)
temp111 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[111], docket$CASES[111],temp110)
temp112 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[112], docket$CASES[112],temp111)
temp113 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[113], docket$CASES[113],temp112)
temp114 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[114], docket$CASES[114],temp113)
temp115 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[115], docket$CASES[115],temp114)
temp116 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[116], docket$CASES[116],temp115)
temp117 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[117], docket$CASES[117],temp116)
temp118 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[118], docket$CASES[118],temp117)
temp119 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[119], docket$CASES[119],temp118)
temp120 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[120], docket$CASES[120],temp119)
temp121 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[121], docket$CASES[121],temp120)
temp122 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[122], docket$CASES[122],temp121)
temp123 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[123], docket$CASES[123],temp122)
temp124 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[124], docket$CASES[124],temp123)
temp125 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[125], docket$CASES[125],temp124)
temp126 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[126], docket$CASES[126],temp125)
temp127 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[127], docket$CASES[127],temp126)
temp128 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[128], docket$CASES[128],temp127)
temp129 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[129], docket$CASES[129],temp128)
temp130 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[130], docket$CASES[130],temp129)
temp131 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[131], docket$CASES[131],temp130)
temp132 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[132], docket$CASES[132],temp131)
temp133 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[133], docket$CASES[133],temp132)
temp134 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[134], docket$CASES[134],temp133)
temp135 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[135], docket$CASES[135],temp134)
temp136 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[136], docket$CASES[136],temp135)
temp137 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[137], docket$CASES[137],temp136)
temp138 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[138], docket$CASES[138],temp137)
temp139 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[139], docket$CASES[139],temp138)
temp140 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[140], docket$CASES[140],temp139)
temp141 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[141], docket$CASES[141],temp140)
temp142 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[142], docket$CASES[142],temp141)
temp143 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[143], docket$CASES[143],temp142)
temp144 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[144], docket$CASES[144],temp143)
temp145 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[145], docket$CASES[145],temp144)
temp146 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[146], docket$CASES[146],temp145)
temp147 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[147], docket$CASES[147],temp146)
temp148 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[148], docket$CASES[148],temp147)
temp149 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[149], docket$CASES[149],temp148)
temp150 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[150], docket$CASES[150],temp149)
temp151 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[151], docket$CASES[151],temp150)
temp152 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[152], docket$CASES[152],temp151)
temp153 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[153], docket$CASES[153],temp152)
temp154 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[154], docket$CASES[154],temp153)
temp155 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[155], docket$CASES[155],temp154)
temp156 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[156], docket$CASES[156],temp155)
temp157 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[157], docket$CASES[157],temp156)
temp158 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[158], docket$CASES[158],temp157)
temp159 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[159], docket$CASES[159],temp158)
temp160 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[160], docket$CASES[160],temp159)
temp161 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[161], docket$CASES[161],temp160)
temp162 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[162], docket$CASES[162],temp161)
temp163 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[163], docket$CASES[163],temp162)
temp164 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[164], docket$CASES[164],temp163)
temp165 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[165], docket$CASES[165],temp164)
temp166 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[166], docket$CASES[166],temp165)
temp167 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[167], docket$CASES[167],temp166)
temp168 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[168], docket$CASES[168],temp167)
temp169 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[169], docket$CASES[169],temp168)
temp170 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[170], docket$CASES[170],temp169)
temp171 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[171], docket$CASES[171],temp170)
temp172 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[172], docket$CASES[172],temp171)
temp173 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[173], docket$CASES[173],temp172)
temp174 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[174], docket$CASES[174],temp173)
temp175 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[175], docket$CASES[175],temp174)
temp176 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[176], docket$CASES[176],temp175)
temp177 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[177], docket$CASES[177],temp176)
temp178 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[178], docket$CASES[178],temp177)
temp179 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[179], docket$CASES[179],temp178)
temp180 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[180], docket$CASES[180],temp179)
temp181 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[181], docket$CASES[181],temp180)
temp182 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[182], docket$CASES[182],temp181)
temp183 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[183], docket$CASES[183],temp182)
temp184 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[184], docket$CASES[184],temp183)
temp185 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[185], docket$CASES[185],temp184)
temp186 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[186], docket$CASES[186],temp185)
temp187 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[187], docket$CASES[187],temp186)
temp188 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[188], docket$CASES[188],temp187)
temp189 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[189], docket$CASES[189],temp188)
temp190 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[190], docket$CASES[190],temp189)
temp191 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[191], docket$CASES[191],temp190)
temp192 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[192], docket$CASES[192],temp191)
temp193 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[193], docket$CASES[193],temp192)
temp194 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[194], docket$CASES[194],temp193)
temp195 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[195], docket$CASES[195],temp194)
temp196 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[196], docket$CASES[196],temp195)
temp197 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[197], docket$CASES[197],temp196)
temp198 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[198], docket$CASES[198],temp197)
temp199 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[199], docket$CASES[199],temp198)
temp200 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[200], docket$CASES[200],temp199)
temp201 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[201], docket$CASES[201],temp200)
temp202 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[202], docket$CASES[202],temp201)
temp203 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[203], docket$CASES[203],temp202)
temp204 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[204], docket$CASES[204],temp203)
temp205 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[205], docket$CASES[205],temp204)
temp206 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[206], docket$CASES[206],temp205)
temp207 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[207], docket$CASES[207],temp206)
temp208 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[208], docket$CASES[208],temp207)
temp209 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[209], docket$CASES[209],temp208)
temp210 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[210], docket$CASES[210],temp209)
temp211 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[211], docket$CASES[211],temp210)
temp212 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[212], docket$CASES[212],temp211)
temp213 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[213], docket$CASES[213],temp212)
temp214 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[214], docket$CASES[214],temp213)
temp215 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[215], docket$CASES[215],temp214)
temp216 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[216], docket$CASES[216],temp215)
temp217 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[217], docket$CASES[217],temp216)
temp218 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[218], docket$CASES[218],temp217)
temp219 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[219], docket$CASES[219],temp218)
temp220 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[220], docket$CASES[220],temp219)
temp221 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[221], docket$CASES[221],temp220)
temp222 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[222], docket$CASES[222],temp221)
temp223 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[223], docket$CASES[223],temp222)
temp224 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[224], docket$CASES[224],temp223)
temp225 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[225], docket$CASES[225],temp224)
temp226 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[226], docket$CASES[226],temp225)
temp227 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[227], docket$CASES[227],temp226)
temp228 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[228], docket$CASES[228],temp227)
temp229 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[229], docket$CASES[229],temp228)
temp230 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[230], docket$CASES[230],temp229)
temp231 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[231], docket$CASES[231],temp230)
temp232 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[232], docket$CASES[232],temp231)
temp233 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[233], docket$CASES[233],temp232)
temp234 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[234], docket$CASES[234],temp233)
temp235 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[235], docket$CASES[235],temp234)
temp236 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[236], docket$CASES[236],temp235)
temp237 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[237], docket$CASES[237],temp236)
temp238 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[238], docket$CASES[238],temp237)
temp239 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[239], docket$CASES[239],temp238)
temp240 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[240], docket$CASES[240],temp239)
temp241 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[241], docket$CASES[241],temp240)
temp242 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[242], docket$CASES[242],temp241)
temp243 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[243], docket$CASES[243],temp242)
temp244 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[244], docket$CASES[244],temp243)
temp245 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[245], docket$CASES[245],temp244)
temp246 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[246], docket$CASES[246],temp245)
temp247 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[247], docket$CASES[247],temp246)
temp248 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[248], docket$CASES[248],temp247)
temp249 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[249], docket$CASES[249],temp248)
temp250 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[250], docket$CASES[250],temp249)
temp251 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[251], docket$CASES[251],temp250)
temp252 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[252], docket$CASES[252],temp251)
temp253 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[253], docket$CASES[253],temp252)
temp254 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[254], docket$CASES[254],temp253)
temp255 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[255], docket$CASES[255],temp254)
temp256 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[256], docket$CASES[256],temp255)
temp257 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[257], docket$CASES[257],temp256)
temp258 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[258], docket$CASES[258],temp257)
temp259 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[259], docket$CASES[259],temp258)
temp260 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[260], docket$CASES[260],temp259)
temp261 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[261], docket$CASES[261],temp260)
temp262 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[262], docket$CASES[262],temp261)
temp263 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[263], docket$CASES[263],temp262)
temp264 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[264], docket$CASES[264],temp263)
temp265 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[265], docket$CASES[265],temp264)
temp266 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[266], docket$CASES[266],temp265)
temp267 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[267], docket$CASES[267],temp266)
temp268 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[268], docket$CASES[268],temp267)
temp269 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[269], docket$CASES[269],temp268)
temp270 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[270], docket$CASES[270],temp269)
temp271 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[271], docket$CASES[271],temp270)
temp272 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[272], docket$CASES[272],temp271)
temp273 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[273], docket$CASES[273],temp272)
temp274 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[274], docket$CASES[274],temp273)
temp275 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[275], docket$CASES[275],temp274)
temp276 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[276], docket$CASES[276],temp275)
temp277 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[277], docket$CASES[277],temp276)
temp278 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[278], docket$CASES[278],temp277)
temp279 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[279], docket$CASES[279],temp278)
temp280 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[280], docket$CASES[280],temp279)
temp281 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[281], docket$CASES[281],temp280)
temp282 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[282], docket$CASES[282],temp281)
temp283 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[283], docket$CASES[283],temp282)
temp284 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[284], docket$CASES[284],temp283)
temp285 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[285], docket$CASES[285],temp284)
temp286 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[286], docket$CASES[286],temp285)
temp287 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[287], docket$CASES[287],temp286)
temp288 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[288], docket$CASES[288],temp287)
temp289 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[289], docket$CASES[289],temp288)
temp290 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[290], docket$CASES[290],temp289)
temp291 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[291], docket$CASES[291],temp290)
temp292 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[292], docket$CASES[292],temp291)
temp293 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[293], docket$CASES[293],temp292)
temp294 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[294], docket$CASES[294],temp293)
temp295 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[295], docket$CASES[295],temp294)
temp296 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[296], docket$CASES[296],temp295)
temp297 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[297], docket$CASES[297],temp296)
temp298 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[298], docket$CASES[298],temp297)
temp299 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[299], docket$CASES[299],temp298)
temp300 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[300], docket$CASES[300],temp299)
temp301 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[301], docket$CASES[301],temp300)
temp302 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[302], docket$CASES[302],temp301)
temp303 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[303], docket$CASES[303],temp302)
temp304 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[304], docket$CASES[304],temp303)
temp305 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[305], docket$CASES[305],temp304)
temp306 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[306], docket$CASES[306],temp305)
temp307 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[307], docket$CASES[307],temp306)
temp308 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[308], docket$CASES[308],temp307)
temp309 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[309], docket$CASES[309],temp308)
temp310 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[310], docket$CASES[310],temp309)
temp311 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[311], docket$CASES[311],temp310)
temp312 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[312], docket$CASES[312],temp311)
temp313 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[313], docket$CASES[313],temp312)
temp314 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[314], docket$CASES[314],temp313)
temp315 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[315], docket$CASES[315],temp314)
temp316 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[316], docket$CASES[316],temp315)
temp317 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[317], docket$CASES[317],temp316)
temp318 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[318], docket$CASES[318],temp317)
temp319 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[319], docket$CASES[319],temp318)
temp320 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[320], docket$CASES[320],temp319)
temp321 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[321], docket$CASES[321],temp320)
temp322 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[322], docket$CASES[322],temp321)
temp323 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[323], docket$CASES[323],temp322)
temp324 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[324], docket$CASES[324],temp323)
temp325 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[325], docket$CASES[325],temp324)
temp326 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[326], docket$CASES[326],temp325)
temp327 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[327], docket$CASES[327],temp326)
temp328 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[328], docket$CASES[328],temp327)
temp329 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[329], docket$CASES[329],temp328)
temp330 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[330], docket$CASES[330],temp329)
temp331 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[331], docket$CASES[331],temp330)
temp332 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[332], docket$CASES[332],temp331)
temp333 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[333], docket$CASES[333],temp332)
temp334 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[334], docket$CASES[334],temp333)
temp335 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[335], docket$CASES[335],temp334)
temp336 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[336], docket$CASES[336],temp335)
temp337 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[337], docket$CASES[337],temp336)
temp338 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[338], docket$CASES[338],temp337)
temp339 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[339], docket$CASES[339],temp338)
temp340 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[340], docket$CASES[340],temp339)
temp341 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[341], docket$CASES[341],temp340)
temp342 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[342], docket$CASES[342],temp341)
temp343 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[343], docket$CASES[343],temp342)
temp344 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[344], docket$CASES[344],temp343)
temp345 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[345], docket$CASES[345],temp344)
temp346 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[346], docket$CASES[346],temp345)
temp347 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[347], docket$CASES[347],temp346)
temp348 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[348], docket$CASES[348],temp347)
temp349 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[349], docket$CASES[349],temp348)
temp350 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[350], docket$CASES[350],temp349)
temp351 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[351], docket$CASES[351],temp350)
temp352 <- ifelse(clean.data$JUDGQYCIRCUIT == docket$JUDGQYCIRCUIT[352], docket$CASES[352],temp351)

clean.data$JUDGQYDOCKET <- temp352

##Binding all case-level data needed for model:

caselevel.data <- cbind(clean.data, Q.No, FLOOD.2d.v1, FLOOD.2d.v2, 
FLOOD.9th.v1, FLOOD.9th.v2,TRANS.2d.v1, TRANS.2d.v2, TRANS.9th.v1, TRANS.9th.v2, 
TREND.2d, TREND.9th,CHANGEt.2d.v1, CHANGEf.2d.v1, CHANGEt.2d.v2, CHANGEf.2d.v2, 
CHANGEt.9th.v1, CHANGEf.9th.v1, CHANGEt.9th.v2, CHANGEf.9th.v2,
VACANCY)


##Create binary dependent variable:

##Treat remand, reverse, reverse in part as "reversed", following Huang.
##Treat the rest as affirmed.

REVERSAL <- ifelse((clean.data$OUTCOME ==2 | clean.data$OUTCOME==3 | 
clean.data$OUTCOME==6), 1, 0)

caselevel.data.logit <- as.data.frame(cbind(caselevel.data, REVERSAL))


case <- caselevel.data.logit

head(case)

####

case$CASESPERJUDGE <- case$JUDGQYDOCKET/case$ACTIVEJ


###

#order by CIRCUIT and JUDGQY:
case <- case[order(case$CIRCUIT,case$JUDGQY),]

#return unique rows within this:
changes <- unique(case[,c("CIRCUIT","JUDGQY","JUDGQYCIRCUIT","ACTIVEJ","JUDGQYDOCKET","CASESPERJUDGE")])

#creating vector 
changes$ACTIVEJ.PREV <- c(NA,changes$ACTIVEJ[1:(nrow(changes)-1)])
changes$ACTIVEJ.PREV <- ifelse(duplicated(changes$CIRCUIT),changes$ACTIVEJ.PREV,NA)


changes$JUDG.CHANGE <- changes$ACTIVEJ-changes$ACTIVEJ.PREV


changes$JUDGQYDOCKET.PREV <- c(NA,changes$JUDGQYDOCKET[1:(nrow(changes)-1)])
changes$JUDGQYDOCKET.PREV <- ifelse(duplicated(changes$CIRCUIT),changes$JUDGQYDOCKET.PREV,NA)

changes$DOCKET.CHANGE <- changes$JUDGQYDOCKET-changes$JUDGQYDOCKET.PREV


changes$CASESPERJUDGE.PREV <- c(NA,changes$CASESPERJUDGE[1:(nrow(changes)-1)])
changes$CASESPERJUDGE.PREV <- ifelse(duplicated(changes$CIRCUIT),changes$CASESPERJUDGE.PREV,NA)

changes$CASESPERJUDGE.CHANGE <- changes$CASESPERJUDGE-changes$CASESPERJUDGE.PREV


changes <- changes[,c(1,2,3,4,6,7,5,8,9,10,11,12)]

JUDG.CHANGE <- DOCKET.CHANGE <- CASESPERJUDGE.CHANGE <- rep(NA,nrow(case))

for(i in 1:nrow(case))
{
	temp.qyc <- case$JUDGQYCIRCUIT[i]
	JUDG.CHANGE[i] <- changes$JUDG.CHANGE[changes$JUDGQYCIRCUIT==temp.qyc]
	DOCKET.CHANGE[i] <- changes$DOCKET.CHANGE[changes$JUDGQYCIRCUIT==temp.qyc]
	CASESPERJUDGE.CHANGE[i] <- changes$CASESPERJUDGE.CHANGE[changes$JUDGQYCIRCUIT==temp.qyc]

}

case$JUDG.CHANGE <- JUDG.CHANGE

case$DOCKET.CHANGE <- DOCKET.CHANGE

case$CASESPERJUDGE.CHANGE <- CASESPERJUDGE.CHANGE

####

temp <- rep("1-", nrow(case))

temp.date <- as.character(paste(temp, case$DKTDATE,sep=""))
docket.date <- as.Date(temp.date, format = "%d-%b-%y")

temp.date.2 <- as.character(paste(temp, case$JUDGDATE,sep=""))
judgment.date <- as.Date(temp.date.2, format = "%d-%b-%y")

length <- judgment.date - docket.date

case$LENGTH <- as.vector(length)

###########################################################################

## To be able to work with this data in the future without having to go through the above:

save(case, file="Case.Rdata")

###########################################################################

## Load .Rdata file:

load("Case.Rdata")

###########################################################################

## To avoid errors in the case-level models in zelig, convert factor variables
## to factor before including them in the model:

case$JUDGQY2 <- as.factor(case$JUDGQY)
case$CIRCUIT2 <- as.factor(case$CIRCUIT)
case$NOS2 <- as.factor(case$NOS)
case$DDIST2 <- as.factor(case$DDIST)

###########################################################################

## Case-level models:
 
## (NB: results for most of these are not included in the paper, but may be of interest.  
## Those that are included in the paper are highlighted.)

#Version 1 (short transition):
z.out.1 <- zelig(REVERSAL ~ TREND.2d + TREND.9th + 
TRANS.2d.v1 + CHANGEt.2d.v1 +
FLOOD.2d.v1 + CHANGEf.2d.v1 +
TRANS.9th.v1 +  CHANGEt.9th.v1 + 
FLOOD.9th.v1 + CHANGEf.9th.v1 + 
JUDGQY2 + CIRCUIT2 + 
GOP + DCTGOP + GOP*DCTGOP + VACANCY,
model = "logit", data = case)

##Version 2 (long transition):
z.out.2 <- zelig(REVERSAL ~ TREND.2d + TREND.9th + 
TRANS.2d.v2 + CHANGEt.2d.v2 +
FLOOD.2d.v2 + CHANGEf.2d.v2 +
TRANS.9th.v2 +  CHANGEt.9th.v2 + 
FLOOD.9th.v2 + CHANGEf.9th.v2 + 
JUDGQY2 + CIRCUIT2 +
GOP + DCTGOP + GOP*DCTGOP + VACANCY,
model = "logit", data = case)

#Robust standard errors:

temp.lrm.1 <-lrm(z.out.1, x=TRUE, y=TRUE, data=case)
g1 <- robcov(temp.lrm.1, case$CIRCUIT)

temp.lrm.2 <-lrm(z.out.2, x=TRUE, y=TRUE, data=case)
g2 <- robcov(temp.lrm.2, case$CIRCUIT)

#Simulating means and standard errors to replicate logit version of final chart in Huang's paper:

se1 <- sqrt(diag(g1$var))
coef1 <- z.out.1$coef

set.seed(02138)
betas1 <- mvrnorm(n = 50000, mu = coef1, Sigma = g1$var)

se2 <- sqrt(diag(g2$var))
coef2 <- z.out.2$coef

set.seed(02138)
betas2 <- mvrnorm(n = 50000, mu = coef2, Sigma = g2$var)


#The Panel A and B functions calculate the estimates the way he did:
##Panel A (floodi + t*(trendi+changefi))##
##creating a function##
panelA <- function (floodi, t, trendi, changefi) {

out <- floodi + t*(trendi+changefi)
return(out)
}

##Panel B (floodi + t*(changefi))##
##creating a function##
panelB<-function (floodi, t, changefi) {
out<-floodi+ t*(changefi)
return(out)
}

##For verstion 1:##
#betas has 55 variables/columns#

dvrga2.1 <- c(rep(0,50000))
dvrga9.1 <- c(rep(0,50000))
dvrgb2.1 <- c(rep(0,50000))
dvrgb9.1 <- c(rep(0,50000))
betas1 <- cbind(betas1, dvrga2.1, dvrga9.1, dvrgb2.1, dvrgb9.1)

##For verstion 2:##
#betas has 55 variables/columns#

dvrga2.2 <- c(rep(0,50000))
dvrga9.2 <- c(rep(0,50000))
dvrgb2.2 <- c(rep(0,50000))
dvrgb9.2 <- c(rep(0,50000))
betas2 <- cbind(betas2, dvrga2.2, dvrga9.2, dvrgb2.2, dvrgb9.2)

##Panel A (1)
#2d Cir:
betas1[,56]<-panelA(betas1[,6],10,betas1[,2],betas1[,7])
#9th Cir:
betas1[,57]<-panelA(betas1[,10],10,betas1[,3],betas1[,11])

##Panel A (2)
#2d Cir:
betas2[,56]<-panelA(betas2[,6],8,betas2[,2],betas2[,7])
#9th Cir:
betas2[,57]<-panelA(betas2[,10],8,betas2[,3],betas2[,11])

##Panel B (1)
#2d Cir:
betas1[,58]<-panelB(betas1[,6],10,betas1[,7])
#9th Cir:
betas1[,59]<-panelB(betas1[,10],10,betas1[,11])

##Panel B(2)
#2d Cir:
betas2[,58]<-panelB(betas2[,6],8,betas2[,7])
#9th Cir:
betas2[,59]<-panelB(betas2[,10],8,betas2[,11])


##the means should the same estimates from before##
##and their SD is the joint standard errors##

#Panel A:
#Version 1:
mean(betas1[,56])
sd(betas1[,56])
mean(betas1[,57])
sd(betas1[,57])
#Version 2:
mean(betas2[,56])
sd(betas2[,56])
mean(betas1[,57])
sd(betas2[,57])

#Panel B:
#Version 1:
mean(betas1[,58])
sd(betas1[,58])
mean(betas1[,59])
sd(betas1[,59])
#Version 2:
mean(betas2[,58])
sd(betas2[,58])
mean(betas2[,59])
sd(betas2[,59])

#2d Cir.:

#Version 1:
z.out.1.x.noflood.2dCir <- setx(z.out.1, FLOOD.2d.v1 = 0)
z.out.1.x.flood.2dCir <- setx(z.out.1, FLOOD.2d.v1 = 1)
s.out.z.out.1.2dCir <- sim(z.out.1, x = z.out.1.x.noflood.2dCir, x1 = z.out.1.x.flood.2dCir)
summary(s.out.z.out.1.2dCir)

#Version 2:
z.out.2.x.noflood.2dCir <- setx(z.out.2, FLOOD.2d.v2 = 0)
z.out.2.x.flood.2dCir <- setx(z.out.2, FLOOD.2d.v2 = 1)
s.out.z.out.2.2dCir <- sim(z.out.2, x = z.out.2.x.noflood.2dCir, x1 = z.out.2.x.flood.2dCir)
summary(s.out.z.out.2.2dCir)


#9th Cir:

#Version 1:
z.out.1.x.noflood.9thCir <- setx(z.out.1, FLOOD.9th.v1 = 0)
z.out.1.x.flood.9thCir <- setx(z.out.1, FLOOD.9th.v1 = 1)
s.out.z.out.1.9thCir <- sim(z.out.1, x = z.out.1.x.noflood.9thCir, x1 = z.out.1.x.flood.9thCir)
summary(s.out.z.out.1.9thCir)

#Version 2:
z.out.2.x.noflood.9thCir <- setx(z.out.2, FLOOD.9th.v2 = 0)
z.out.2.x.flood.9thCir <- setx(z.out.2, FLOOD.9th.v2 = 1)
s.out.z.out.2.9thCir <- sim(z.out.2, x = z.out.2.x.noflood.9thCir, x1 = z.out.2.x.flood.9thCir)
summary(s.out.z.out.2.9thCir)


######

## Case-level logits including other controls:

z.out.1.CONTROLS <- zelig(REVERSAL ~ TREND.2d + TREND.9th + 
TRANS.2d.v1 + CHANGEt.2d.v1 +
FLOOD.2d.v1 + CHANGEf.2d.v1 +
TRANS.9th.v1 +  CHANGEt.9th.v1 + 
FLOOD.9th.v1 + CHANGEf.9th.v1 + 
JUDGQY2 + CIRCUIT2 + 
GOP + DCTGOP + GOP*DCTGOP + VACANCY +
NOS2+ USAPE + DDIST2,
model = "logit", data = case)

summary(z.out.1.CONTROLS)


##########


## Case-level logits with new TV's (discussed in Part III):

#Number of active judges and number of cases on the docket, 
#controlling for quarter fixed effects, circuit fixed effects, 
#and political composition:
z.out.1.ACTIVEJ <- zelig(REVERSAL ~ 
ACTIVEJ + JUDGQYDOCKET +
JUDGQY2 + CIRCUIT2 + 
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case)


#first differences:
logit.ACTIVEJ.low <- setx(z.out.1.ACTIVEJ, ACTIVEJ = min(case$ACTIVEJ), JUDGQYDOCKET=max(case$JUDGQYDOCKET))
logit.ACTIVEJ.high <- setx(z.out.1.ACTIVEJ, ACTIVEJ = max(case$ACTIVEJ), JUDGQYDOCKET=min(case$JUDGQYDOCKET))
s.out.1.logit.ACTIVEJ <- sim(z.out.1.ACTIVEJ, x=logit.ACTIVEJ.low, x1=logit.ACTIVEJ.high)
summary(s.out.1.logit.ACTIVEJ)
plot(s.out.1.logit.ACTIVEJ)
plot(density(s.out.1.logit.ACTIVEJ$qi$ev[,2]))

s.out.1.logit.ACTIVEJ.low <- sim(z.out.1.ACTIVEJ, x=logit.ACTIVEJ.low)
s.out.1.logit.ACTIVEJ.high <- sim(z.out.1.ACTIVEJ, x=logit.ACTIVEJ.high)
summary(s.out.1.logit.ACTIVEJ.low)
summary(s.out.1.logit.ACTIVEJ.high)
plot(density(s.out.1.logit.ACTIVEJ.low$qi$ev[,1]))
plot(density(s.out.1.logit.ACTIVEJ.high$qi$ev[,1]))



#Number of active judges and number of cases on the docket, 
#conrolling for quarter fixed effects, circuit fixed effects, 
#political composition, nature of suit, US appellant, and dist. court:
z.out.1.ACTIVEJ.CONTROLS <- zelig(REVERSAL ~ 
ACTIVEJ + JUDGQYDOCKET +
JUDGQY2 + CIRCUIT2 + 
GOP + DCTGOP + GOP*DCTGOP +
NOS2+ USAPE + DDIST2,
model = "logit", data = case)
#Not a big difference...


#Number of cases on the docket per judge, 
#controlling for quarter fixed effects, circuit fixed effects, 
#and political composition, nature of suit, US appellant, and dist. court:
z.out.1.ACTIVEJ.CASESPERJUDGE <- zelig(REVERSAL ~ 
CASESPERJUDGE +
JUDGQY2 + CIRCUIT2 + 
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case)

logit.CASESPERJUDGE.low <- setx(z.out.1.ACTIVEJ.CASESPERJUDGE , CASESPERJUDGE = min(case$CASESPERJUDGE))
logit.CASESPERJUDGE.high <- setx(z.out.1.ACTIVEJ.CASESPERJUDGE,  CASESPERJUDGE = max(case$CASESPERJUDGE))
s.out.1.logit.ACTIVEJ.CASESPERJUDGE <- sim(z.out.1.ACTIVEJ.CASESPERJUDGE, x= logit.CASESPERJUDGE.low, x1= logit.CASESPERJUDGE.high)
summary(s.out.1.logit.ACTIVEJ.CASESPERJUDGE)


vars <- c("REVERSAL", "JUDG.CHANGE", "DOCKET.CHANGE", "CASESPERJUDGE.CHANGE", "JUDGQY2", "CIRCUIT2", "GOP", "DCTGOP", "NOS2", "USAPE", "DDIST2", "LENGTH")
case.2 <- na.omit(case[,vars])
case.2 <- case[case$JUDGQY2!=19974,]



#Q-o-q change in number of active judges and number of cases on the docket, 
#conrolling for quarter fixed effects, circuit fixed effects, 
#political composition, nature of suit, US appellant, and dist. court:
z.out.1.ACTIVEJ.CHANGE <- zelig(REVERSAL ~ 
JUDG.CHANGE + DOCKET.CHANGE +
CIRCUIT2 + 
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case.2)


logit.ACTIVEJ.CHANGE.low <- setx(z.out.1.ACTIVEJ.CHANGE, JUDG.CHANGE = max(case.2$JUDG.CHANGE), DOCKET.CHANGE = min(case.2$DOCKET.CHANGE))
logit.ACTIVEJ.CHANGE.high <- setx(z.out.1.ACTIVEJ.CHANGE, JUDG.CHANGE = min(case.2$JUDG.CHANGE), DOCKET.CHANGE = max(case.2$DOCKET.CHANGE))
s.out.logit.ACTIVEJ.CHANGE <- sim(z.out.1.ACTIVEJ.CHANGE, x = logit.ACTIVEJ.CHANGE.low, x1 = logit.ACTIVEJ.CHANGE.high)
summary(s.out.logit.ACTIVEJ.CHANGE)


#(not providing for quarter fixed effects when TV is q-o-q change)
#Q-o-q change in number of cases on the docket per judge, 
#conrolling for quarter fixed effects, circuit fixed effects, 
#political composition, nature of suit, US appellant, and dist. court:
z.out.1.CASESPERJUDGE.CHANGE <- zelig(REVERSAL ~ 
CASESPERJUDGE.CHANGE +
CIRCUIT2 + 
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case.2)
summary(z.out.1.CASESPERJUDGE.CHANGE)

#Finding quantities of interest - first differences:

logit.CASESPERJUDGE.CHANGE.low <- setx(z.out.1.CASESPERJUDGE.CHANGE, CASESPERJUDGE.CHANGE = min(case.2$CASESPERJUDGE.CHANGE))
logit.CASESPERJUDGE.CHANGE.high <- setx(z.out.1.CASESPERJUDGE.CHANGE, CASESPERJUDGE.CHANGE = max(case.2$CASESPERJUDGE.CHANGE))
s.out.logit.CASESPERJUDGE.CHANGE <- sim(z.out.1.CASESPERJUDGE.CHANGE, x = logit.CASESPERJUDGE.CHANGE.low, x1 = logit.CASESPERJUDGE.CHANGE.high)
summary(s.out.logit.CASESPERJUDGE.CHANGE )

plot(s.out.logit.CASESPERJUDGE.CHANGE$qi$fd)


summary(z.out.1.ACTIVEJ)
summary(z.out.1.ACTIVEJ.CONTROLS)
summary(z.out.1.ACTIVEJ.CASESPERJUDGE)
summary(z.out.1.ACTIVEJ.CHANGE)
summary(z.out.1.CASESPERJUDGE.CHANGE)

###################################################
##                  Figure 7:                    ##
## First Differences in Predicted Reversal Rates ## 
## for Four Alternative Measures of Workload     ##
###################################################

#Line plots: Showing first differences with confidence intervals for the four alternative models:

install.packages("gplots")
library(gplots)

mean.ACTIVEJ <- mean(s.out.1.logit.ACTIVEJ$qi$fd)
ci.ACTIVEJ <- 1.96*sd(s.out.1.logit.ACTIVEJ$qi$fd)

mean.CASESPERJUDGE <- mean(s.out.1.logit.ACTIVEJ.CASESPERJUDGE$qi$fd)
ci.CASESPERJUDGE <- 1.96*sd(s.out.1.logit.ACTIVEJ.CASESPERJUDGE$qi$fd)

mean.ACTIVEJ.CHANGE <- mean(s.out.logit.ACTIVEJ.CHANGE$qi$fd)
ci.ACTIVEJ.CHANGE <- 1.96*sd(s.out.logit.ACTIVEJ.CHANGE$qi$fd)

mean.CASESPERJUDGE.CHANGE <- mean(s.out.logit.CASESPERJUDGE.CHANGE$qi$fd)
ci.CASESPERJUDGE.CHANGE <-  1.96*sd(s.out.logit.CASESPERJUDGE.CHANGE$qi$fd)


logit.means <- c(mean.CASESPERJUDGE.CHANGE, mean.ACTIVEJ.CHANGE, mean.CASESPERJUDGE, mean.ACTIVEJ)
logit.cis <- c(ci.CASESPERJUDGE.CHANGE, ci.ACTIVEJ.CHANGE, ci.CASESPERJUDGE, ci.ACTIVEJ)

plotCI(x = logit.means, 
uiw = logit.cis, xlim= c(.5,4.5), ylab = "First Differences in Predicted Reversal Rates", xlab="Alternative Treatment",  col="black", barcol="blue", lwd=2)
abline(h = 0, col = "red")

##############################


## New DV: Length of time on docket

#Flood as treatment variable,
#controlling for quarter fixed effects, circuit fixed effects, 
#political composition, nature of suit, US appellant, and dist. court:
lm.LENGTH.FLOOD <- lm(LENGTH ~ 
TREND.2d + TREND.9th + 
TRANS.2d.v1 + CHANGEt.2d.v1 +
FLOOD.2d.v1 + CHANGEf.2d.v1 +
TRANS.9th.v1 +  CHANGEt.9th.v1 + 
FLOOD.9th.v1 + CHANGEf.9th.v1 + 
factor(JUDGQY) + factor(CIRCUIT) + 
GOP + DCTGOP + GOP*DCTGOP + VACANCY,
data = case)

summary(lm.LENGTH.FLOOD)
#Simulating means and standard errors to replicate logit version of final chart:

#(using "lm" not zelig):
lm.LENGTH.FLOOD$cov
summary(lm.LENGTH.FLOOD)$cov
lm.LENGTH.FLOOD$coef

#simulating:
set.seed(02138)
lm.betas1 <- mvrnorm(n = 50000, mu = lm.LENGTH.FLOOD$coef, Sigma = summary(lm.LENGTH.FLOOD)$cov)

##For verstion 1:##
#betas has 55 variables/columns#

lm.dvrga2.1 <- c(rep(0,50000))
lm.dvrga9.1 <- c(rep(0,50000))
lm.dvrgb2.1 <- c(rep(0,50000))
lm.dvrgb9.1 <- c(rep(0,50000))
lm.betas1 <- cbind(lm.betas1, lm.dvrga2.1, lm.dvrga9.1, lm.dvrgb2.1, lm.dvrgb9.1)


##Panel A (1)
#2d Cir:
lm.betas1[,56]<-panelA(lm.betas1[,6],10,lm.betas1[,2],lm.betas1[,7])
#9th Cir:
lm.betas1[,57]<-panelA(lm.betas1[,10],10,lm.betas1[,3],lm.betas1[,11])

##Panel B (1)
#2d Cir:
lm.betas1[,58]<-panelB(lm.betas1[,6],10,lm.betas1[,7])
#9th Cir:
lm.betas1[,59]<-panelB(lm.betas1[,10],10,lm.betas1[,11])

##the means should the same estimates from before##
##and their SD is the joint standard errors##

#Panel A:
#Version 1:
#2d Cir:
mean(lm.betas1[,56])
sd(lm.betas1[,56])
#9th Cir:
mean(lm.betas1[,57])
sd(lm.betas1[,57])

#Panel B:
#Version 1:
#2d Cir:
mean(lm.betas1[,58])
sd(lm.betas1[,58])
#9th Cir:
mean(lm.betas1[,59])
sd(lm.betas1[,59])


#Number of active judges and number of cases on the docket, 
#controlling for quarter fixed effects, circuit fixed effects, 
#and political composition:
lm.LENGTH.ACTIVEJ <- zelig(LENGTH ~ 
ACTIVEJ + JUDGQYDOCKET +
JUDGQY2 + CIRCUIT2 + 
GOP + DCTGOP + GOP*DCTGOP,
model = "ls", data = case)

summary(lm.LENGTH.ACTIVEJ)

#first differences:
lm.LENGTH.ACTIVEJ.low <- setx(lm.LENGTH.ACTIVEJ, ACTIVEJ = min(case$ACTIVEJ), JUDGQYDOCKET=max(case$JUDGQYDOCKET))
lm.LENGTH.ACTIVEJ.high <- setx(lm.LENGTH.ACTIVEJ, ACTIVEJ = max(case$ACTIVEJ), JUDGQYDOCKET=min(case$JUDGQYDOCKET))
s.out.lm.LENGTH.ACTIVEJ <- sim(lm.LENGTH.ACTIVEJ, x=lm.LENGTH.ACTIVEJ.low , x1=lm.LENGTH.ACTIVEJ.high)
summary(s.out.lm.LENGTH.ACTIVEJ)

#Number of cases on the docket per judge, 
#controlling for quarter fixed effects, circuit fixed effects, 
#and political composition, nature of suit, US appellant, and dist. court:
lm.LENGTH.CASESPERJUDGE <- zelig(LENGTH ~ 
CASESPERJUDGE +
JUDGQY2 + CIRCUIT2 + 
GOP + DCTGOP + GOP*DCTGOP,
model = "ls", data = case)

summary(lm.LENGTH.CASESPERJUDGE)

lm.LENGTH.CASESPERJUDGE.low <- setx(lm.LENGTH.CASESPERJUDGE, CASESPERJUDGE = min(case$CASESPERJUDGE))
lm.LENGTH.CASESPERJUDGE.high <- setx(lm.LENGTH.CASESPERJUDGE,  CASESPERJUDGE = max(case$CASESPERJUDGE))
s.out.lm.LENGTH.CASESPERJUDGE <- sim(lm.LENGTH.CASESPERJUDGE, x= lm.LENGTH.CASESPERJUDGE.low, x1= lm.LENGTH.CASESPERJUDGE.high)
summary(s.out.lm.LENGTH.CASESPERJUDGE)

#Q-o-q change in number of active judges and number of cases on the docket, 
#controlling for quarter fixed effects, circuit fixed effects, 
#political composition, nature of suit, US appellant, and dist. court:
lm.LENGTH.ACTIVEJ.CHANGE <- zelig(LENGTH ~ 
JUDG.CHANGE + DOCKET.CHANGE +
CIRCUIT2 + 
GOP + DCTGOP + GOP*DCTGOP,
model = "ls", data = case.2)

summary(lm.LENGTH.ACTIVEJ.CHANGE)

lm.LENGTH.ACTIVEJ.CHANGE.low <- setx(lm.LENGTH.ACTIVEJ.CHANGE, JUDG.CHANGE = max(case.2$JUDG.CHANGE), DOCKET.CHANGE = min(case.2$DOCKET.CHANGE))
lm.LENGTH.ACTIVEJ.CHANGE.high <- setx(lm.LENGTH.ACTIVEJ.CHANGE, JUDG.CHANGE = min(case.2$JUDG.CHANGE), DOCKET.CHANGE = max(case.2$DOCKET.CHANGE))
s.out.lm.LENGTH.ACTIVEJ.CHANGE <- sim(lm.LENGTH.ACTIVEJ.CHANGE, x = lm.LENGTH.ACTIVEJ.CHANGE.low, x1 = lm.LENGTH.ACTIVEJ.CHANGE.high)
summary(s.out.lm.LENGTH.ACTIVEJ.CHANGE)


#Q-o-q change in number of cases on the docket per judge, 
#controlling for quarter fixed effects, circuit fixed effects, 
#and political composition, nature of suit, US appellant, and dist. court:
lm.LENGTH.CASESPERJUDGE.CHANGE <- zelig(LENGTH ~ 
CASESPERJUDGE.CHANGE +
CIRCUIT2 + 
GOP + DCTGOP + GOP*DCTGOP,
model = "ls", data = case.2)

summary(lm.LENGTH.CASESPERJUDGE.CHANGE)

lm.LENGTH.CASESPERJUDGE.CHANGE.low <- setx(lm.LENGTH.CASESPERJUDGE.CHANGE, CASESPERJUDGE.CHANGE = min(case.2$CASESPERJUDGE.CHANGE))
lm.LENGTH.CASESPERJUDGE.CHANGE.high <- setx(lm.LENGTH.CASESPERJUDGE.CHANGE, CASESPERJUDGE.CHANGE = max(case.2$CASESPERJUDGE.CHANGE))
s.out.lm.LENGTH.CASESPERJUDGE.CHANGE <- sim(lm.LENGTH.CASESPERJUDGE.CHANGE, x = lm.LENGTH.CASESPERJUDGE.CHANGE.low , x1 = lm.LENGTH.CASESPERJUDGE.CHANGE.high)
summary(s.out.lm.LENGTH.CASESPERJUDGE.CHANGE)


summary(lm.LENGTH.ACTIVEJ)
summary(s.out.lm.LENGTH.ACTIVEJ)
summary(lm.LENGTH.CASESPERJUDGE)
summary(s.out.lm.LENGTH.CASESPERJUDGE)
summary(lm.LENGTH.ACTIVEJ.CHANGE)
summary(s.out.lm.LENGTH.ACTIVEJ.CHANGE)
summary(lm.LENGTH.CASESPERJUDGE.CHANGE)
summary(s.out.lm.LENGTH.CASESPERJUDGE.CHANGE)



######################################################################

## Logits by circuit:

# TV of number of active judges and cases on docket:

z.out.1.ACTIVEJ.1 <- zelig(REVERSAL ~ 
ACTIVEJ + JUDGQYDOCKET +
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case[case$CIRCUIT == 1,])

z.out.1.ACTIVEJ.2 <- zelig(REVERSAL ~ 
ACTIVEJ + JUDGQYDOCKET +
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case[case$CIRCUIT == 2,])

z.out.1.ACTIVEJ.3 <- zelig(REVERSAL ~ 
ACTIVEJ + JUDGQYDOCKET +
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case[case$CIRCUIT == 3,])

z.out.1.ACTIVEJ.4 <- zelig(REVERSAL ~ 
ACTIVEJ + JUDGQYDOCKET +
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case[case$CIRCUIT == 4,])

z.out.1.ACTIVEJ.5 <- zelig(REVERSAL ~ 
ACTIVEJ + JUDGQYDOCKET +
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case[case$CIRCUIT == 5,])

z.out.1.ACTIVEJ.6 <- zelig(REVERSAL ~ 
ACTIVEJ + JUDGQYDOCKET +
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case[case$CIRCUIT == 6,])

z.out.1.ACTIVEJ.7 <- zelig(REVERSAL ~ 
ACTIVEJ + JUDGQYDOCKET +
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case[case$CIRCUIT == 7,])

z.out.1.ACTIVEJ.8 <- zelig(REVERSAL ~ 
ACTIVEJ + JUDGQYDOCKET +
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case[case$CIRCUIT == 8,])

z.out.1.ACTIVEJ.9 <- zelig(REVERSAL ~ 
ACTIVEJ + JUDGQYDOCKET +
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case[case$CIRCUIT == 9,])

z.out.1.ACTIVEJ.10 <- zelig(REVERSAL ~ 
ACTIVEJ + JUDGQYDOCKET +
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case[case$CIRCUIT == 10,])

z.out.1.ACTIVEJ.11 <- zelig(REVERSAL ~ 
ACTIVEJ + JUDGQYDOCKET +
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case[case$CIRCUIT == 11,])


summary(z.out.1.ACTIVEJ.1)
summary(z.out.1.ACTIVEJ.2)
summary(z.out.1.ACTIVEJ.3)
summary(z.out.1.ACTIVEJ.4)
summary(z.out.1.ACTIVEJ.5)
summary(z.out.1.ACTIVEJ.6)
summary(z.out.1.ACTIVEJ.7)
summary(z.out.1.ACTIVEJ.8)
summary(z.out.1.ACTIVEJ.9)
summary(z.out.1.ACTIVEJ.10)
summary(z.out.1.ACTIVEJ.11)



# TV of cases per judge:

z.out.1.ACTIVEJ.CASESPERJUDGE.1 <- zelig(REVERSAL ~ 
CASESPERJUDGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case[case$CIRCUIT == 1,])

z.out.1.ACTIVEJ.CASESPERJUDGE.2 <- zelig(REVERSAL ~ 
CASESPERJUDGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case[case$CIRCUIT == 2,])

z.out.1.ACTIVEJ.CASESPERJUDGE.3 <- zelig(REVERSAL ~ 
CASESPERJUDGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case[case$CIRCUIT == 3,])

z.out.1.ACTIVEJ.CASESPERJUDGE.4 <- zelig(REVERSAL ~ 
CASESPERJUDGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case[case$CIRCUIT == 4,])

z.out.1.ACTIVEJ.CASESPERJUDGE.5 <- zelig(REVERSAL ~ 
CASESPERJUDGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case[case$CIRCUIT == 5,])

z.out.1.ACTIVEJ.CASESPERJUDGE.6 <- zelig(REVERSAL ~ 
CASESPERJUDGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case[case$CIRCUIT == 6,])

z.out.1.ACTIVEJ.CASESPERJUDGE.7 <- zelig(REVERSAL ~ 
CASESPERJUDGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case[case$CIRCUIT == 7,])

z.out.1.ACTIVEJ.CASESPERJUDGE.8 <- zelig(REVERSAL ~ 
CASESPERJUDGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case[case$CIRCUIT == 8,])

z.out.1.ACTIVEJ.CASESPERJUDGE.9 <- zelig(REVERSAL ~ 
CASESPERJUDGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case[case$CIRCUIT == 9,])

z.out.1.ACTIVEJ.CASESPERJUDGE.10 <- zelig(REVERSAL ~ 
CASESPERJUDGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case[case$CIRCUIT == 10,])

z.out.1.ACTIVEJ.CASESPERJUDGE.11 <- zelig(REVERSAL ~ 
CASESPERJUDGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case[case$CIRCUIT == 11,])

summary(z.out.1.ACTIVEJ.CASESPERJUDGE.1)
summary(z.out.1.ACTIVEJ.CASESPERJUDGE.2)
summary(z.out.1.ACTIVEJ.CASESPERJUDGE.3)
summary(z.out.1.ACTIVEJ.CASESPERJUDGE.4)
summary(z.out.1.ACTIVEJ.CASESPERJUDGE.5)
summary(z.out.1.ACTIVEJ.CASESPERJUDGE.6)
summary(z.out.1.ACTIVEJ.CASESPERJUDGE.7)
summary(z.out.1.ACTIVEJ.CASESPERJUDGE.8)
summary(z.out.1.ACTIVEJ.CASESPERJUDGE.9)
summary(z.out.1.ACTIVEJ.CASESPERJUDGE.10)
summary(z.out.1.ACTIVEJ.CASESPERJUDGE.11)


## Change in number of judges and change in number of cases on the docket:

z.out.1.ACTIVEJ.CHANGE.1 <- zelig(REVERSAL ~ 
JUDG.CHANGE + DOCKET.CHANGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case.2[case.2$CIRCUIT == 1,])

z.out.1.ACTIVEJ.CHANGE.2 <- zelig(REVERSAL ~ 
JUDG.CHANGE + DOCKET.CHANGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case.2[case.2$CIRCUIT == 2,])

z.out.1.ACTIVEJ.CHANGE.3 <- zelig(REVERSAL ~ 
JUDG.CHANGE + DOCKET.CHANGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case.2[case.2$CIRCUIT == 3,])

z.out.1.ACTIVEJ.CHANGE.4 <- zelig(REVERSAL ~ 
JUDG.CHANGE + DOCKET.CHANGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case.2[case.2$CIRCUIT == 4,])

z.out.1.ACTIVEJ.CHANGE.5 <- zelig(REVERSAL ~ 
JUDG.CHANGE + DOCKET.CHANGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case.2[case.2$CIRCUIT == 5,])

z.out.1.ACTIVEJ.CHANGE.6 <- zelig(REVERSAL ~ 
JUDG.CHANGE + DOCKET.CHANGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case.2[case.2$CIRCUIT == 6,])

z.out.1.ACTIVEJ.CHANGE.7 <- zelig(REVERSAL ~ 
JUDG.CHANGE + DOCKET.CHANGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case.2[case.2$CIRCUIT == 7,])

z.out.1.ACTIVEJ.CHANGE.8 <- zelig(REVERSAL ~ 
JUDG.CHANGE + DOCKET.CHANGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case.2[case.2$CIRCUIT == 8,])

z.out.1.ACTIVEJ.CHANGE.9 <- zelig(REVERSAL ~ 
JUDG.CHANGE + DOCKET.CHANGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case.2[case.2$CIRCUIT == 9,])

z.out.1.ACTIVEJ.CHANGE.10 <- zelig(REVERSAL ~ 
JUDG.CHANGE + DOCKET.CHANGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case.2[case.2$CIRCUIT == 10,])

z.out.1.ACTIVEJ.CHANGE.11 <- zelig(REVERSAL ~ 
JUDG.CHANGE + DOCKET.CHANGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case.2[case.2$CIRCUIT == 11,])

summary(z.out.1.ACTIVEJ.CHANGE.1)
summary(z.out.1.ACTIVEJ.CHANGE.2)
summary(z.out.1.ACTIVEJ.CHANGE.3)
summary(z.out.1.ACTIVEJ.CHANGE.4)
summary(z.out.1.ACTIVEJ.CHANGE.5)
summary(z.out.1.ACTIVEJ.CHANGE.6)
summary(z.out.1.ACTIVEJ.CHANGE.7)
summary(z.out.1.ACTIVEJ.CHANGE.8)
summary(z.out.1.ACTIVEJ.CHANGE.9)
summary(z.out.1.ACTIVEJ.CHANGE.10)
summary(z.out.1.ACTIVEJ.CHANGE.11)



# TV of change in cases per judge:

z.out.1.CASESPERJUDGE.CHANGE.1 <- zelig(REVERSAL ~ 
CASESPERJUDGE.CHANGE +
+ GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case.2[case.2$CIRCUIT == 1,])

z.out.1.CASESPERJUDGE.CHANGE.2 <- zelig(REVERSAL ~ 
CASESPERJUDGE.CHANGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case.2[case.2$CIRCUIT == 2,])

z.out.1.CASESPERJUDGE.CHANGE.3 <- zelig(REVERSAL ~ 
CASESPERJUDGE.CHANGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case.2[case.2$CIRCUIT == 3,])

z.out.1.CASESPERJUDGE.CHANGE.4 <- zelig(REVERSAL ~ 
CASESPERJUDGE.CHANGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case.2[case.2$CIRCUIT == 4,])

z.out.1.CASESPERJUDGE.CHANGE.5 <- zelig(REVERSAL ~ 
CASESPERJUDGE.CHANGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case.2[case.2$CIRCUIT == 5,])

z.out.1.CASESPERJUDGE.CHANGE.6 <- zelig(REVERSAL ~ 
CASESPERJUDGE.CHANGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case.2[case.2$CIRCUIT == 6,])

z.out.1.CASESPERJUDGE.CHANGE.7 <- zelig(REVERSAL ~ 
CASESPERJUDGE.CHANGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case.2[case.2$CIRCUIT == 7,])

z.out.1.CASESPERJUDGE.CHANGE.8 <- zelig(REVERSAL ~ 
CASESPERJUDGE.CHANGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case.2[case.2$CIRCUIT == 8,])

z.out.1.CASESPERJUDGE.CHANGE.9 <- zelig(REVERSAL ~ 
CASESPERJUDGE.CHANGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case.2[case.2$CIRCUIT == 9,])

z.out.1.CASESPERJUDGE.CHANGE.10 <- zelig(REVERSAL ~ 
CASESPERJUDGE.CHANGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case.2[case.2$CIRCUIT == 10,])

z.out.1.CASESPERJUDGE.CHANGE.11 <- zelig(REVERSAL ~ 
CASESPERJUDGE.CHANGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "logit", data = case.2[case.2$CIRCUIT == 11,])

summary(z.out.1.CASESPERJUDGE.CHANGE.1)
summary(z.out.1.CASESPERJUDGE.CHANGE.2)
summary(z.out.1.CASESPERJUDGE.CHANGE.3)
summary(z.out.1.CASESPERJUDGE.CHANGE.4)
summary(z.out.1.CASESPERJUDGE.CHANGE.5)
summary(z.out.1.CASESPERJUDGE.CHANGE.6)
summary(z.out.1.CASESPERJUDGE.CHANGE.7)
summary(z.out.1.CASESPERJUDGE.CHANGE.8)
summary(z.out.1.CASESPERJUDGE.CHANGE.9)
summary(z.out.1.CASESPERJUDGE.CHANGE.10)
summary(z.out.1.CASESPERJUDGE.CHANGE.11)



#################################################
##                  Figure 8:                  ##
##  Circuit Level Effects of Change in Cases   ##
##   Per Judge on Predicted Reversal Rates     ##
#################################################


#1st Cir:

temp.logit.CASESPERJUDGE.CHANGE.1 <- setx(z.out.1.CASESPERJUDGE.CHANGE.1, CASESPERJUDGE.CHANGE = -10:10)
s.out.logit.CASESPERJUDGE.CHANGE.1 <- sim(z.out.1.CASESPERJUDGE.CHANGE.1, x = temp.logit.CASESPERJUDGE.CHANGE.1)

plot.ci(s.out.logit.CASESPERJUDGE.CHANGE.1, xlab = "Change in Cases per Judge",
         ylab = "Predicted Probability of Reversing",
         main = "Effect of Judicial Workload on Reversal Rates: First Circuit")


#2d Cir:

temp.logit.CASESPERJUDGE.CHANGE.2 <- setx(z.out.1.CASESPERJUDGE.CHANGE.2, CASESPERJUDGE.CHANGE = -25:25)
s.out.logit.CASESPERJUDGE.CHANGE.2 <- sim(z.out.1.CASESPERJUDGE.CHANGE.2, x = temp.logit.CASESPERJUDGE.CHANGE.2)

plot.ci(s.out.logit.CASESPERJUDGE.CHANGE.2, xlab = "Change in Cases per Judge",
         ylab = "Predicted Probability of Reversing",
         main = "Effect of Judicial Workload on Reversal Rates: Second Circuit")


#3d Cir:

temp.logit.CASESPERJUDGE.CHANGE.3 <- setx(z.out.1.CASESPERJUDGE.CHANGE.3, CASESPERJUDGE.CHANGE = -25:25)
s.out.logit.CASESPERJUDGE.CHANGE.3 <- sim(z.out.1.CASESPERJUDGE.CHANGE.3, x = temp.logit.CASESPERJUDGE.CHANGE.3)

plot.ci(s.out.logit.CASESPERJUDGE.CHANGE.3, xlab = "Change in Cases per Judge",
         ylab = "Predicted Probability of Reversing",
         main = "Effect of Judicial Workload on Reversal Rates: Third Circuit")


#4th Cir:

temp.logit.CASESPERJUDGE.CHANGE.4 <- setx(z.out.1.CASESPERJUDGE.CHANGE.4, CASESPERJUDGE.CHANGE = -25:25)
s.out.logit.CASESPERJUDGE.CHANGE.4 <- sim(z.out.1.CASESPERJUDGE.CHANGE.4, x = temp.logit.CASESPERJUDGE.CHANGE.4)

plot.ci(s.out.logit.CASESPERJUDGE.CHANGE.4, xlab = "Change in Cases per Judge",
         ylab = "Predicted Probability of Reversing",
         main = "Effect of Judicial Workload on Reversal Rates: Fourth Circuit")


#5th Cir:

temp.logit.CASESPERJUDGE.CHANGE.5 <- setx(z.out.1.CASESPERJUDGE.CHANGE.5, CASESPERJUDGE.CHANGE = -25:25)
s.out.logit.CASESPERJUDGE.CHANGE.5 <- sim(z.out.1.CASESPERJUDGE.CHANGE.5, x = temp.logit.CASESPERJUDGE.CHANGE.5)

plot.ci(s.out.logit.CASESPERJUDGE.CHANGE.5, xlab = "Change in Cases per Judge",
         ylab = "Predicted Probability of Reversing",
         main = "Effect of Judicial Workload on Reversal Rates: Fifth Circuit")


#6th Cir:

temp.logit.CASESPERJUDGE.CHANGE.6 <- setx(z.out.1.CASESPERJUDGE.CHANGE.6, CASESPERJUDGE.CHANGE = -25:25)
s.out.logit.CASESPERJUDGE.CHANGE.6 <- sim(z.out.1.CASESPERJUDGE.CHANGE.6, x = temp.logit.CASESPERJUDGE.CHANGE.6)

plot.ci(s.out.logit.CASESPERJUDGE.CHANGE.6, xlab = "Change in Cases per Judge",
         ylab = "Predicted Probability of Reversing",
         main = "Effect of Judicial Workload on Reversal Rates: Sixth Circuit")


#7th Cir:

temp.logit.CASESPERJUDGE.CHANGE.7 <- setx(z.out.1.CASESPERJUDGE.CHANGE.7, CASESPERJUDGE.CHANGE = -25:25)
s.out.logit.CASESPERJUDGE.CHANGE.7 <- sim(z.out.1.CASESPERJUDGE.CHANGE.7, x = temp.logit.CASESPERJUDGE.CHANGE.7)

plot.ci(s.out.logit.CASESPERJUDGE.CHANGE.7, xlab = "Change in Cases per Judge",
         ylab = "Predicted Probability of Reversing",
         main = "Effect of Judicial Workload on Reversal Rates: Seventh Circuit")



#8th Cir:

temp.logit.CASESPERJUDGE.CHANGE.8 <- setx(z.out.1.CASESPERJUDGE.CHANGE.8, CASESPERJUDGE.CHANGE = -25:25)
s.out.logit.CASESPERJUDGE.CHANGE.8 <- sim(z.out.1.CASESPERJUDGE.CHANGE.8, x = temp.logit.CASESPERJUDGE.CHANGE.8)

plot.ci(s.out.logit.CASESPERJUDGE.CHANGE.8, xlab = "Change in Cases per Judge",
         ylab = "Predicted Probability of Reversing",
         main = "Effect of Judicial Workload on Reversal Rates: Eighth Circuit")


#9th Cir:

temp.logit.CASESPERJUDGE.CHANGE.9 <- setx(z.out.1.CASESPERJUDGE.CHANGE.9, CASESPERJUDGE.CHANGE = -25:25)
s.out.logit.CASESPERJUDGE.CHANGE.9 <- sim(z.out.1.CASESPERJUDGE.CHANGE.9, x = temp.logit.CASESPERJUDGE.CHANGE.9)

plot.ci(s.out.logit.CASESPERJUDGE.CHANGE.9, xlab = "Change in Cases per Judge",
         ylab = "Predicted Probability of Reversing",
         main = "Effect of Judicial Workload on Reversal Rates: Ninth Circuit")


#10th Cir:

temp.logit.CASESPERJUDGE.CHANGE.10 <- setx(z.out.1.CASESPERJUDGE.CHANGE.10, CASESPERJUDGE.CHANGE = -25:25)
s.out.logit.CASESPERJUDGE.CHANGE.10 <- sim(z.out.1.CASESPERJUDGE.CHANGE.10, x = temp.logit.CASESPERJUDGE.CHANGE.10)

plot.ci(s.out.logit.CASESPERJUDGE.CHANGE.10, xlab = "Change in Cases per Judge",
         ylab = "Predicted Probability of Reversing",
         main = "Effect of Judicial Workload on Reversal Rates: Tenth Circuit")


#11th Cir:

temp.logit.CASESPERJUDGE.CHANGE.11 <- setx(z.out.1.CASESPERJUDGE.CHANGE.11, CASESPERJUDGE.CHANGE = -25:25)
s.out.logit.CASESPERJUDGE.CHANGE.11 <- sim(z.out.1.CASESPERJUDGE.CHANGE.11, x = temp.logit.CASESPERJUDGE.CHANGE.11)

plot.ci(s.out.logit.CASESPERJUDGE.CHANGE.11,
	xlab = "Change in Cases per Judge",
    ylab = "Predicted Probability of Reversing",
    main = "Effect of Judicial Workload on Reversal Rates: Eleventh Circuit")

par(mfrow=c(4,3), oma=c(2,0,2,0))
plot.ci(s.out.logit.CASESPERJUDGE.CHANGE.1, xlab = "Change in Cases per Judge",
         ylab = "Reversal Probability", ylim= c(0,0.25),
         main = "First Circuit")
plot.ci(s.out.logit.CASESPERJUDGE.CHANGE.2, xlab = "Change in Cases per Judge",
         ylab = "Reversal Probability",ylim= c(0,0.25),
         main = "Second Circuit")
plot.ci(s.out.logit.CASESPERJUDGE.CHANGE.3, xlab = "Change in Cases per Judge",
         ylab = "Reversal Probability",ylim= c(0,0.25),
         main = "Third Circuit")
plot.ci(s.out.logit.CASESPERJUDGE.CHANGE.4, xlab = "Change in Cases per Judge",
         ylab = "Reversal Probability",ylim= c(0,0.25),
         main = "Fourth Circuit")
plot.ci(s.out.logit.CASESPERJUDGE.CHANGE.5, xlab = "Change in Cases per Judge",
         ylab = "Reversal Probability",ylim= c(0,0.25),
         main = "Fifth Circuit")
plot.ci(s.out.logit.CASESPERJUDGE.CHANGE.6, xlab = "Change in Cases per Judge",
         ylab = "Reversal Probability",ylim= c(0,0.25),
         main = "Sixth Circuit")
plot.ci(s.out.logit.CASESPERJUDGE.CHANGE.7, xlab = "Change in Cases per Judge",
         ylab = "Reversal Probability",ylim= c(0,0.25),
         main = "Seventh Circuit")
plot.ci(s.out.logit.CASESPERJUDGE.CHANGE.8, xlab = "Change in Cases per Judge",
         ylab = "Reversal Probability",ylim= c(0,0.25),
         main = "Eighth Circuit")
plot.ci(s.out.logit.CASESPERJUDGE.CHANGE.9, xlab = "Change in Cases per Judge",
         ylab = "Reversal Probability",ylim= c(0,0.25),
         main = "Ninth Circuit")
plot.ci(s.out.logit.CASESPERJUDGE.CHANGE.10, xlab = "Change in Cases per Judge",
         ylab = "Reversal Probability",ylim= c(0,0.25),
         main = "Tenth Circuit")
plot.ci(s.out.logit.CASESPERJUDGE.CHANGE.11, xlab = "Change in Cases per Judge",
    ylab = "Reversal Probability",ylim= c(0,0.25),
    main = "Eleventh Circuit")         

###################################################################

## OLS models with Length as DV, by circuit:

lm.LENGTH.FLOOD.2 <- lm(LENGTH ~ 
TREND.2d + TREND.9th + 
TRANS.2d.v1 + CHANGEt.2d.v1 +
FLOOD.2d.v1 + CHANGEf.2d.v1 +
TRANS.9th.v1 +  CHANGEt.9th.v1 + 
FLOOD.9th.v1 + CHANGEf.9th.v1 + 
factor(JUDGQY) + GOP + DCTGOP + GOP*DCTGOP +
VACANCY,
data = case[case$CIRCUIT == 2,])

lm.LENGTH.FLOOD.9 <- lm(LENGTH ~ 
TREND.2d + TREND.9th + 
TRANS.2d.v1 + CHANGEt.2d.v1 +
FLOOD.2d.v1 + CHANGEf.2d.v1 +
TRANS.9th.v1 +  CHANGEt.9th.v1 + 
FLOOD.9th.v1 + CHANGEf.9th.v1 + 
factor(JUDGQY) + GOP + DCTGOP + GOP*DCTGOP +
VACANCY,
data = case[case$CIRCUIT == 9,])

summary(lm.LENGTH.FLOOD.2)
summary(lm.LENGTH.FLOOD.9)

###################################################################

## OLS estimates of with Length as DV, with alternative TVs, by circuit:

# TV of cases per judge:

lm.LENGTH.CASESPERJUDGE.1 <- lm(LENGTH ~ 
CASESPERJUDGE +
GOP + DCTGOP + GOP*DCTGOP,
data = case[case$CIRCUIT == 1,])

lm.LENGTH.CASESPERJUDGE.2 <- lm(LENGTH ~ 
CASESPERJUDGE +
GOP + DCTGOP + GOP*DCTGOP,
data = case[case$CIRCUIT == 2,])

lm.LENGTH.CASESPERJUDGE.3 <- lm(LENGTH ~ 
CASESPERJUDGE +
GOP + DCTGOP + GOP*DCTGOP,
data = case[case$CIRCUIT == 3,])

lm.LENGTH.CASESPERJUDGE.4 <- lm(LENGTH ~ 
CASESPERJUDGE +
GOP + DCTGOP + GOP*DCTGOP,
data = case[case$CIRCUIT == 4,])

lm.LENGTH.CASESPERJUDGE.5 <- lm(LENGTH ~ 
CASESPERJUDGE +
GOP + DCTGOP + GOP*DCTGOP,
data = case[case$CIRCUIT == 5,])

lm.LENGTH.CASESPERJUDGE.6 <- lm(LENGTH ~ 
CASESPERJUDGE +
GOP + DCTGOP + GOP*DCTGOP,
data = case[case$CIRCUIT == 6,])

lm.LENGTH.CASESPERJUDGE.6 <- lm(LENGTH ~ 
CASESPERJUDGE +
GOP + DCTGOP + GOP*DCTGOP,
data = case[case$CIRCUIT == 6,])

lm.LENGTH.CASESPERJUDGE.7 <- lm(LENGTH ~ 
CASESPERJUDGE +
GOP + DCTGOP + GOP*DCTGOP,
data = case[case$CIRCUIT == 7,])

lm.LENGTH.CASESPERJUDGE.8 <- lm(LENGTH ~ 
CASESPERJUDGE +
GOP + DCTGOP + GOP*DCTGOP,
data = case[case$CIRCUIT == 8,])

lm.LENGTH.CASESPERJUDGE.9 <- lm(LENGTH ~ 
CASESPERJUDGE +
GOP + DCTGOP + GOP*DCTGOP,
data = case[case$CIRCUIT == 9,])

lm.LENGTH.CASESPERJUDGE.10 <- lm(LENGTH ~ 
CASESPERJUDGE +
GOP + DCTGOP + GOP*DCTGOP,
data = case[case$CIRCUIT == 10,])

lm.LENGTH.CASESPERJUDGE.11 <- lm(LENGTH ~ 
CASESPERJUDGE +
GOP + DCTGOP + GOP*DCTGOP,
data = case[case$CIRCUIT == 11,])

summary(lm.LENGTH.CASESPERJUDGE.1)
summary(lm.LENGTH.CASESPERJUDGE.2)
summary(lm.LENGTH.CASESPERJUDGE.3)
summary(lm.LENGTH.CASESPERJUDGE.4)
summary(lm.LENGTH.CASESPERJUDGE.5)
summary(lm.LENGTH.CASESPERJUDGE.6)
summary(lm.LENGTH.CASESPERJUDGE.7)
summary(lm.LENGTH.CASESPERJUDGE.8)
summary(lm.LENGTH.CASESPERJUDGE.9)
summary(lm.LENGTH.CASESPERJUDGE.10)
summary(lm.LENGTH.CASESPERJUDGE.11)

#######################

# TV of change in cases per judge (calculation of first differences below each model):

lm.LENGTH.CASESPERJUDGE.CHANGE.1 <- zelig(LENGTH ~ 
CASESPERJUDGE.CHANGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "ls",
data = case.2[case.2$CIRCUIT == 1,])

lm.LENGTH.CASESPERJUDGE.CHANGE.1.low <- setx(lm.LENGTH.CASESPERJUDGE.CHANGE.1, CASESPERJUDGE.CHANGE = min(case.2[case.2$CIRCUIT == 1,]$CASESPERJUDGE.CHANGE))
lm.LENGTH.CASESPERJUDGE.CHANGE.1.high <- setx(lm.LENGTH.CASESPERJUDGE.CHANGE.1, CASESPERJUDGE.CHANGE = max(case.2[case.2$CIRCUIT == 1,]$CASESPERJUDGE.CHANGE))
s.out.lm.LENGTH.CASESPERJUDGE.CHANGE.1 <- sim(lm.LENGTH.CASESPERJUDGE.CHANGE.1, x=lm.LENGTH.CASESPERJUDGE.CHANGE.1.low,lm.LENGTH.CASESPERJUDGE.CHANGE.1.high)


lm.LENGTH.CASESPERJUDGE.CHANGE.2 <- zelig(LENGTH ~ 
CASESPERJUDGE.CHANGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "ls",
data = case.2[case.2$CIRCUIT == 2,])

lm.LENGTH.CASESPERJUDGE.CHANGE.2.low <- setx(lm.LENGTH.CASESPERJUDGE.CHANGE.2, CASESPERJUDGE.CHANGE = min(case.2[case.2$CIRCUIT == 2,]$CASESPERJUDGE.CHANGE))
lm.LENGTH.CASESPERJUDGE.CHANGE.2.high <- setx(lm.LENGTH.CASESPERJUDGE.CHANGE.2, CASESPERJUDGE.CHANGE = max(case.2[case.2$CIRCUIT == 2,]$CASESPERJUDGE.CHANGE))
s.out.lm.LENGTH.CASESPERJUDGE.CHANGE.2 <- sim(lm.LENGTH.CASESPERJUDGE.CHANGE.2, x=lm.LENGTH.CASESPERJUDGE.CHANGE.2.low,lm.LENGTH.CASESPERJUDGE.CHANGE.2.high)


lm.LENGTH.CASESPERJUDGE.CHANGE.3 <- zelig(LENGTH ~ 
CASESPERJUDGE.CHANGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "ls",
data = case.2[case.2$CIRCUIT == 3,])

lm.LENGTH.CASESPERJUDGE.CHANGE.3.low <- setx(lm.LENGTH.CASESPERJUDGE.CHANGE.3, CASESPERJUDGE.CHANGE = min(case.2[case.2$CIRCUIT == 3,]$CASESPERJUDGE.CHANGE))
lm.LENGTH.CASESPERJUDGE.CHANGE.3.high <- setx(lm.LENGTH.CASESPERJUDGE.CHANGE.3, CASESPERJUDGE.CHANGE = max(case.2[case.2$CIRCUIT == 3,]$CASESPERJUDGE.CHANGE))
s.out.lm.LENGTH.CASESPERJUDGE.CHANGE.3 <- sim(lm.LENGTH.CASESPERJUDGE.CHANGE.3, x=lm.LENGTH.CASESPERJUDGE.CHANGE.3.low,lm.LENGTH.CASESPERJUDGE.CHANGE.3.high)


lm.LENGTH.CASESPERJUDGE.CHANGE.4 <- zelig(LENGTH ~ 
CASESPERJUDGE.CHANGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "ls",
data = case.2[case.2$CIRCUIT == 4,])

lm.LENGTH.CASESPERJUDGE.CHANGE.4.low <- setx(lm.LENGTH.CASESPERJUDGE.CHANGE.4, CASESPERJUDGE.CHANGE = min(case.2[case.2$CIRCUIT == 4,]$CASESPERJUDGE.CHANGE))
lm.LENGTH.CASESPERJUDGE.CHANGE.4.high <- setx(lm.LENGTH.CASESPERJUDGE.CHANGE.4, CASESPERJUDGE.CHANGE = max(case.2[case.2$CIRCUIT == 4,]$CASESPERJUDGE.CHANGE))
s.out.lm.LENGTH.CASESPERJUDGE.CHANGE.4 <- sim(lm.LENGTH.CASESPERJUDGE.CHANGE.4, x=lm.LENGTH.CASESPERJUDGE.CHANGE.4.low,lm.LENGTH.CASESPERJUDGE.CHANGE.4.high)


lm.LENGTH.CASESPERJUDGE.CHANGE.5 <- zelig(LENGTH ~ 
CASESPERJUDGE.CHANGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "ls",
data = case.2[case.2$CIRCUIT == 5,])

lm.LENGTH.CASESPERJUDGE.CHANGE.5.low <- setx(lm.LENGTH.CASESPERJUDGE.CHANGE.5, CASESPERJUDGE.CHANGE = min(case.2[case.2$CIRCUIT == 5,]$CASESPERJUDGE.CHANGE))
lm.LENGTH.CASESPERJUDGE.CHANGE.5.high <- setx(lm.LENGTH.CASESPERJUDGE.CHANGE.5, CASESPERJUDGE.CHANGE = max(case.2[case.2$CIRCUIT == 5,]$CASESPERJUDGE.CHANGE))
s.out.lm.LENGTH.CASESPERJUDGE.CHANGE.5 <- sim(lm.LENGTH.CASESPERJUDGE.CHANGE.5, x=lm.LENGTH.CASESPERJUDGE.CHANGE.5.low,lm.LENGTH.CASESPERJUDGE.CHANGE.5.high)


lm.LENGTH.CASESPERJUDGE.CHANGE.6 <- zelig(LENGTH ~ 
CASESPERJUDGE.CHANGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "ls",
data = case.2[case.2$CIRCUIT == 6,])

lm.LENGTH.CASESPERJUDGE.CHANGE.6.low <- setx(lm.LENGTH.CASESPERJUDGE.CHANGE.6, CASESPERJUDGE.CHANGE = min(case.2[case.2$CIRCUIT == 6,]$CASESPERJUDGE.CHANGE))
lm.LENGTH.CASESPERJUDGE.CHANGE.6.high <- setx(lm.LENGTH.CASESPERJUDGE.CHANGE.6, CASESPERJUDGE.CHANGE = max(case.2[case.2$CIRCUIT == 6,]$CASESPERJUDGE.CHANGE))
s.out.lm.LENGTH.CASESPERJUDGE.CHANGE.6 <- sim(lm.LENGTH.CASESPERJUDGE.CHANGE.6, x=lm.LENGTH.CASESPERJUDGE.CHANGE.6.low,lm.LENGTH.CASESPERJUDGE.CHANGE.6.high)


lm.LENGTH.CASESPERJUDGE.CHANGE.7 <- zelig(LENGTH ~ 
CASESPERJUDGE.CHANGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "ls",
data = case.2[case.2$CIRCUIT == 7,])

lm.LENGTH.CASESPERJUDGE.CHANGE.7.low <- setx(lm.LENGTH.CASESPERJUDGE.CHANGE.7, CASESPERJUDGE.CHANGE = min(case.2[case.2$CIRCUIT == 7,]$CASESPERJUDGE.CHANGE))
lm.LENGTH.CASESPERJUDGE.CHANGE.7.high <- setx(lm.LENGTH.CASESPERJUDGE.CHANGE.7, CASESPERJUDGE.CHANGE = max(case.2[case.2$CIRCUIT == 7,]$CASESPERJUDGE.CHANGE))
s.out.lm.LENGTH.CASESPERJUDGE.CHANGE.7 <- sim(lm.LENGTH.CASESPERJUDGE.CHANGE.7, x=lm.LENGTH.CASESPERJUDGE.CHANGE.7.low,lm.LENGTH.CASESPERJUDGE.CHANGE.7.high)


lm.LENGTH.CASESPERJUDGE.CHANGE.8 <- zelig(LENGTH ~ 
CASESPERJUDGE.CHANGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "ls",
data = case.2[case.2$CIRCUIT == 8,])

lm.LENGTH.CASESPERJUDGE.CHANGE.8.low <- setx(lm.LENGTH.CASESPERJUDGE.CHANGE.8, CASESPERJUDGE.CHANGE = min(case.2[case.2$CIRCUIT == 8,]$CASESPERJUDGE.CHANGE))
lm.LENGTH.CASESPERJUDGE.CHANGE.8.high <- setx(lm.LENGTH.CASESPERJUDGE.CHANGE.8, CASESPERJUDGE.CHANGE = max(case.2[case.2$CIRCUIT == 8,]$CASESPERJUDGE.CHANGE))
s.out.lm.LENGTH.CASESPERJUDGE.CHANGE.8 <- sim(lm.LENGTH.CASESPERJUDGE.CHANGE.8, x=lm.LENGTH.CASESPERJUDGE.CHANGE.8.low,lm.LENGTH.CASESPERJUDGE.CHANGE.8.high)


lm.LENGTH.CASESPERJUDGE.CHANGE.9 <- zelig(LENGTH ~ 
CASESPERJUDGE.CHANGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "ls",
data = case.2[case.2$CIRCUIT == 9,])

lm.LENGTH.CASESPERJUDGE.CHANGE.9.low <- setx(lm.LENGTH.CASESPERJUDGE.CHANGE.9, CASESPERJUDGE.CHANGE = min(case.2[case.2$CIRCUIT == 9,]$CASESPERJUDGE.CHANGE))
lm.LENGTH.CASESPERJUDGE.CHANGE.9.high <- setx(lm.LENGTH.CASESPERJUDGE.CHANGE.9, CASESPERJUDGE.CHANGE = max(case.2[case.2$CIRCUIT == 9,]$CASESPERJUDGE.CHANGE))
s.out.lm.LENGTH.CASESPERJUDGE.CHANGE.9 <- sim(lm.LENGTH.CASESPERJUDGE.CHANGE.9, x=lm.LENGTH.CASESPERJUDGE.CHANGE.9.low,lm.LENGTH.CASESPERJUDGE.CHANGE.9.high)


lm.LENGTH.CASESPERJUDGE.CHANGE.10 <- zelig(LENGTH ~ 
CASESPERJUDGE.CHANGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "ls",
data = case.2[case.2$CIRCUIT == 10,])

lm.LENGTH.CASESPERJUDGE.CHANGE.10.low <- setx(lm.LENGTH.CASESPERJUDGE.CHANGE.10, CASESPERJUDGE.CHANGE = min(case.2[case.2$CIRCUIT == 10,]$CASESPERJUDGE.CHANGE))
lm.LENGTH.CASESPERJUDGE.CHANGE.10.high <- setx(lm.LENGTH.CASESPERJUDGE.CHANGE.10, CASESPERJUDGE.CHANGE = max(case.2[case.2$CIRCUIT == 10,]$CASESPERJUDGE.CHANGE))
s.out.lm.LENGTH.CASESPERJUDGE.CHANGE.10 <- sim(lm.LENGTH.CASESPERJUDGE.CHANGE.10, x=lm.LENGTH.CASESPERJUDGE.CHANGE.10.low,lm.LENGTH.CASESPERJUDGE.CHANGE.10.high)


lm.LENGTH.CASESPERJUDGE.CHANGE.11 <- zelig(LENGTH ~ 
CASESPERJUDGE.CHANGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "ls",
data = case.2[case.2$CIRCUIT == 11,])

lm.LENGTH.CASESPERJUDGE.CHANGE.11.low <- setx(lm.LENGTH.CASESPERJUDGE.CHANGE.11, CASESPERJUDGE.CHANGE = min(case.2[case.2$CIRCUIT == 11,]$CASESPERJUDGE.CHANGE))
lm.LENGTH.CASESPERJUDGE.CHANGE.11.high <- setx(lm.LENGTH.CASESPERJUDGE.CHANGE.11, CASESPERJUDGE.CHANGE = max(case.2[case.2$CIRCUIT == 11,]$CASESPERJUDGE.CHANGE))
s.out.lm.LENGTH.CASESPERJUDGE.CHANGE.11 <- sim(lm.LENGTH.CASESPERJUDGE.CHANGE.11, x=lm.LENGTH.CASESPERJUDGE.CHANGE.11.low,lm.LENGTH.CASESPERJUDGE.CHANGE.11.high)


summary(s.out.lm.LENGTH.CASESPERJUDGE.CHANGE.1)
summary(s.out.lm.LENGTH.CASESPERJUDGE.CHANGE.2)
summary(s.out.lm.LENGTH.CASESPERJUDGE.CHANGE.3)
summary(s.out.lm.LENGTH.CASESPERJUDGE.CHANGE.4)
summary(s.out.lm.LENGTH.CASESPERJUDGE.CHANGE.5)
summary(s.out.lm.LENGTH.CASESPERJUDGE.CHANGE.6)
summary(s.out.lm.LENGTH.CASESPERJUDGE.CHANGE.7)
summary(s.out.lm.LENGTH.CASESPERJUDGE.CHANGE.8)
summary(s.out.lm.LENGTH.CASESPERJUDGE.CHANGE.9)
summary(s.out.lm.LENGTH.CASESPERJUDGE.CHANGE.10)
summary(s.out.lm.LENGTH.CASESPERJUDGE.CHANGE.11)



#################################################
##                  Figure 9:                  ##
## First Dierences in Number of Days to Render ##
##   a Decision as Cases Per Judge Increases   ##
#################################################


coef.vec <- c(11.8, 12.4, -10, 5.1, 24, -16.7, 4.6,37.8, 33.7, 45.6, 30.3)
y.axis <- c(length(coef.vec):1)

X <- c("1st Circuit", "2nd Circuit", "3rd Circuit", "4th Circuit", "5th Circuit", "6th Circuit", "7th Circuit", "8th Circuit", "9th Circuit", "10th Circuit", "11th Circuit")

par(mar=c(7, 7, 5, 3))
plot(0,0, xlim=c(-80,80),
	ylim=c(1,11), ylab=" ", xlab="Change in Number of Days to Render Decisions", type= "n", axes = F)
abline(v=0)
axis(1)
axis(2, at= y.axis, labels=X,las = 1, tick = T, ,mgp = c(2,.6,0),
    cex.axis = 1.2)
points(x=11.8, y=11)
points(x=12.4, y=10)
points(x=-10, y=9)
points(x=5.1, y=8)
points(x=24, y=7)
points(x=-16.7, y=6)
points(x=4.6, y=5)
points(x=37.8, y=4)
points(x=33.7, y=3)
points(x=45.6, y=2)
points(x=30.3, y=1)
segments(-9.7, 11, 33.3, 11, col="red")
segments(-4.2, 10, 29, 10,col="red")
segments(-23.3, 9, 2.61, 9,col="red")
segments(-13.6, 8, 24.6, 8, col="red")
segments(1, 7, 46.6, 7, col="blue",lwd=2)
segments(-42.8, 6, 6.6, 6, col="red")
segments(-13.3, 5, 22.4, 5, col="red")
segments(19.22, 4, 55.9, 4, col="blue",lwd=2)
segments(18.7, 3, 48.6, 3, col="blue",lwd=2)
segments(13.9, 2, 76.2, 2, col="blue",lwd=2)

###########################################################################

## Multinomial logits with multiple outcome possibilities:

##################

## Treating possible outcomes as only REVERSE/REMAND/AFFIRM:

## Creating dataframe:

case.limited <- case[case$OUTCOME == 1 | case$OUTCOME == 2 | case$OUTCOME == 3 | case$OUTCOME == 6,]

# OUTCOME1 variable: REVERSE if reversed or reversed in part, REMAND if remanded, AFFIRM if affirmed
# REVERSE:
OUTCOME1a <- ifelse(case.limited$OUTCOME == 2 | case.limited$OUTCOME == 3, "REVERSE",case.limited$OUTCOME)
# REMAND:
OUTCOME1b <- ifelse(case.limited$OUTCOME == 6, "REMAND", OUTCOME1a)
# AFFIRM:
OUTCOME1c <- ifelse(case.limited$OUTCOME == 1, "AFFIRM", OUTCOME1b)

case.limited$OUTCOME.UNORDERED <- (OUTCOME1c)

case.limited$OUTCOME.UNORDERED <- as.factor(case.limited$OUTCOME.UNORDERED)
case.limited$JUDGQY <- as.factor(case.limited$JUDGQY) 
case.limited$CIRCUIT <- as.factor(case.limited$CIRCUIT) 


## For specifications with "Change" variables - need to take out 19974 to prevent errors:

vars <- c("OUTCOME.UNORDERED", "JUDG.CHANGE", "DOCKET.CHANGE", "CASESPERJUDGE.CHANGE", "JUDGQY", "CIRCUIT", "GOP", "DCTGOP")
case.limited.2 <- na.omit(case.limited[,vars])
case.limited.2$JUDGQY2 <- case.limited$JUDGQY[case.limited$JUDGQY!=19974]
case.limited.2$JUDGQY2 <- factor(case.limited.2$JUDGQY2)

## Running models:

## (NB: many of these take a long time to run.)

# Multinomial version of Huang's model:

mnl.1 <- zelig(as.factor(OUTCOME.UNORDERED)~
FLOOD.2d.v1 + FLOOD.9th.v1 +
TRANS.2d.v1 + TRANS.9th.v1 + TREND.2d + TREND.9th + 
CHANGEt.2d.v1 + CHANGEf.2d.v1 + CHANGEt.9th.v1 + CHANGEf.9th.v1 + 
VACANCY + JUDGQY + CIRCUIT + GOP + DCTGOP + GOP*DCTGOP,
model = "mlogit", data = case.limited)

#2d Cir:
x.noflood.2dCir <- setx(mnl.1, FLOOD.2d.v1 = 0)
x.flood.2dCir <- setx(mnl.1, FLOOD.2d.v1 = 1)
s.out.mnl.1.2dCir <- sim(mnl.1, x = x.noflood.2dCir, x1 = x.flood.2dCir)
summary(s.out.mnl.1.2dCir)
plot(s.out.mnl.1.2dCir)

#9th Cir:
x.noflood.9thCir <- setx(mnl.1, FLOOD.9th.v1 = 0)
x.flood.9thCir <- setx(mnl.1, FLOOD.9th.v1 = 1)
s.out.mnl.1.9thCir <- sim(mnl.1, x = x.noflood.9thCir, x1 = x.flood.9thCir)
summary(s.out.mnl.1.9thCir)
plot(s.out.mnl.1.9thCir)


# Huang's model, but looking at 2d and 9th separately:

#2d Cir.:
mnl.1.sep.2d <- zelig(as.factor(OUTCOME.UNORDERED)~
FLOOD.2d.v1 +
TRANS.2d.v1 + TREND.2d + 
CHANGEt.2d.v1 + CHANGEf.2d.v1 + 
VACANCY + JUDGQY + CIRCUIT + GOP + DCTGOP + GOP*DCTGOP,
model = "mlogit", data = case.limited)

x.noflood.sep.2d  <- setx(mnl.1.sep.2d, FLOOD.2d.v1 = 0)
x.flood.sep.2d  <- setx(mnl.1.sep.2d, FLOOD.2d.v1 = 1)
s.out.mnl.1.sep.2d <- sim(mnl.1.sep.2d, x = x.noflood.sep.2d, x1 = x.flood.sep.2d )
summary(s.out.mnl.1.sep.2d)
plot(s.out.mnl.1.sep.2d)

#9th Cir.:
mnl.1.sep.9th <- zelig(as.factor(OUTCOME.UNORDERED)~
FLOOD.9th.v1 +
TRANS.9th.v1 + TREND.9th + 
CHANGEt.9th.v1 + CHANGEf.9th.v1 + 
VACANCY + JUDGQY + CIRCUIT + GOP + DCTGOP + GOP*DCTGOP,
model = "mlogit", data = case.limited)

x.noflood.sep.9th  <- setx(mnl.1.sep.9th, FLOOD.9th.v1 = 0)
x.flood.sep.9th  <- setx(mnl.1.sep.9th, FLOOD.9th.v1 = 1)
s.out.mnl.1.sep.9th <- sim(mnl.1.sep.9th, x = x.noflood.sep.9th, x1 = x.flood.sep.9th )
summary(s.out.mnl.1.sep.9th)
plot(s.out.mnl.1.sep.9th)


# Using alternative treatment variables:

mnl.ACTIVEJ <- zelig(as.factor(OUTCOME.UNORDERED)  ~ 
ACTIVEJ + JUDGQYDOCKET +
JUDGQY + CIRCUIT + GOP + DCTGOP + GOP*DCTGOP, 
model = "mlogit", data = case.limited)

effort.light.ACTIVEJ <- setx(mnl.ACTIVEJ, ACTIVEJ = max(case.limited$ACTIVEJ),JUDGQYDOCKET = min(case.limited$JUDGQYDOCKET))
effort.heavy.ACTIVEJ <- setx(mnl.ACTIVEJ, ACTIVEJ = min(case.limited$ACTIVEJ),JUDGQYDOCKET = max(case.limited$JUDGQYDOCKET))
s.out.mnl.ACTIVEJ <- sim(mnl.ACTIVEJ, x = effort.light.ACTIVEJ , x1 = effort.heavy.ACTIVEJ)
summary(s.out.mnl.ACTIVEJ)
plot(s.out.mnl.ACTIVEJ)

#

z.out.mnl.CASESPERJUDGE <- zelig(as.factor(OUTCOME.UNORDERED) ~ 
CASESPERJUDGE +
JUDGQY + CIRCUIT + GOP + DCTGOP + GOP*DCTGOP,
model = "mlogit", data = case.limited)

effort.light.CASESPERJUDGE <- setx(z.out.mnl.CASESPERJUDGE, CASESPERJUDGE = min(case.limited$CASESPERJUDGE))
effort.heavy.CASESPERJUDGE <- setx(z.out.mnl.CASESPERJUDGE, CASESPERJUDGE = max(case.limited$CASESPERJUDGE))
s.out.mnl.CASESPERJUDGE <- sim(z.out.mnl.CASESPERJUDGE, x = effort.light.CASESPERJUDGE, x1 = effort.heavy.CASESPERJUDGE)
summary(s.out.mnl.CASESPERJUDGE)
plot(s.out.mnl.CASESPERJUDGE)

#

mnl.ACTIVEJ.CHANGE <- zelig(as.factor(OUTCOME.UNORDERED)  ~ 
JUDG.CHANGE + DOCKET.CHANGE +
JUDGQY2 + CIRCUIT + GOP + DCTGOP + GOP*DCTGOP, 
model = "mlogit", data = case.limited.2)

effort.light.ACTIVEJ.CHANGE <- setx(mnl.ACTIVEJ.CHANGE, JUDG.CHANGE = max(case.limited.2$JUDG.CHANGE),DOCKET.CHANGE = min(case.limited.2$DOCKET.CHANGE))
effort.heavy.ACTIVEJ.CHANGE <- setx(mnl.ACTIVEJ.CHANGE, JUDG.CHANGE = min(case.limited.2$JUDG.CHANGE),DOCKET.CHANGE = max(case.limited.2$DOCKET.CHANGE))
s.out.mnl.ACTIVEJ.CHANGE <- sim(mnl.ACTIVEJ.CHANGE, x = effort.light.ACTIVEJ.CHANGE , x1 = effort.heavy.ACTIVEJ.CHANGE)
summary(s.out.mnl.ACTIVEJ.CHANGE)
plot(s.out.mnl.ACTIVEJ.CHANGE)

#

mnl.CASESPERJUDGE.CHANGE <- zelig(as.factor(OUTCOME.UNORDERED) ~ 
CASESPERJUDGE.CHANGE +
JUDGQY2 + CIRCUIT + GOP + DCTGOP + GOP*DCTGOP,
model = "mlogit", data = case.limited.2)

effort.light.CASESPERJUDGE.CHANGE <- setx(mnl.CASESPERJUDGE.CHANGE, CASESPERJUDGE.CHANGE = min(case.limited.2$CASESPERJUDGE.CHANGE))
effort.heavy.CASESPERJUDGE.CHANGE <- setx(mnl.CASESPERJUDGE.CHANGE, CASESPERJUDGE.CHANGE = max(case.limited.2$CASESPERJUDGE.CHANGE))
s.out.mnl.CASESPERJUDGE.CHANGE <- sim(mnl.CASESPERJUDGE.CHANGE, x = effort.light.CASESPERJUDGE.CHANGE, x1 = effort.heavy.CASESPERJUDGE.CHANGE)
summary(s.out.mnl.CASESPERJUDGE.CHANGE)
plot(s.out.mnl.CASESPERJUDGE.CHANGE)


#By circuit:

mnl.2.1stCir <- zelig(as.factor(OUTCOME.UNORDERED) ~ 
CASESPERJUDGE.CHANGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "mlogit", data = case.limited.2[case.limited.2$CIRCUIT==1,])

effort.light.2.1stCir <- setx(mnl.2.1stCir, CASESPERJUDGE.CHANGE = min(case.limited.2[case.limited.2$CIRCUIT==1,]$CASESPERJUDGE.CHANGE))
effort.heavy.2.1stCir <- setx(mnl.2.1stCir, CASESPERJUDGE.CHANGE = max(case.limited.2[case.limited.2$CIRCUIT==1,]$CASESPERJUDGE.CHANGE))
s.out.mnl.2.1stCir <- sim(mnl.2.1stCir, x = effort.light.2.1stCir, x1 = effort.heavy.2.1stCir)
summary(s.out.mnl.2.1stCir)
plot(s.out.mnl.2.1stCir)


mnl.2.2dCir <- zelig(as.factor(OUTCOME.UNORDERED) ~ 
CASESPERJUDGE.CHANGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "mlogit", data = case.limited.2[case.limited.2$CIRCUIT==2,])

effort.light.2.2dCir <- setx(mnl.2.2dCir, CASESPERJUDGE.CHANGE = min(case.limited.2[case.limited.2$CIRCUIT==2,]$CASESPERJUDGE.CHANGE))
effort.heavy.2.2dCir <- setx(mnl.2.2dCir, CASESPERJUDGE.CHANGE = max(case.limited.2[case.limited.2$CIRCUIT==2,]$CASESPERJUDGE.CHANGE))
s.out.mnl.2.2dCir <- sim(mnl.2.2dCir, x = effort.light.2.2dCir, x1 = effort.heavy.2.2dCir)
summary(s.out.mnl.2.2dCir)
plot(s.out.mnl.2.2dCir)


mnl.2.3dCir <- zelig(as.factor(OUTCOME.UNORDERED) ~ 
CASESPERJUDGE.CHANGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "mlogit", data = case.limited.2[case.limited.2$CIRCUIT==3,])

effort.light.2.3dCir <- setx(mnl.2.3dCir, CASESPERJUDGE.CHANGE = min(case.limited.2[case.limited.2$CIRCUIT==3,]$CASESPERJUDGE.CHANGE))
effort.heavy.2.3dCir <- setx(mnl.2.3dCir, CASESPERJUDGE.CHANGE = max(case.limited.2[case.limited.2$CIRCUIT==3,]$CASESPERJUDGE.CHANGE))
s.out.mnl.2.3dCir <- sim(mnl.2.3dCir, x = effort.light.2.3dCir, x1 = effort.heavy.2.3dCir)
summary(s.out.mnl.2.3dCir)
plot(s.out.mnl.2.3dCir)


mnl.2.4thCir <- zelig(as.factor(OUTCOME.UNORDERED) ~ 
CASESPERJUDGE.CHANGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "mlogit", data = case.limited.2[case.limited.2$CIRCUIT==4,])

effort.light.2.4thCir <- setx(mnl.2.4thCir, CASESPERJUDGE.CHANGE = min(case.limited.2[case.limited.2$CIRCUIT==4,]$CASESPERJUDGE.CHANGE))
effort.heavy.2.4thCir <- setx(mnl.2.4thCir, CASESPERJUDGE.CHANGE = max(case.limited.2[case.limited.2$CIRCUIT==4,]$CASESPERJUDGE.CHANGE))
s.out.mnl.2.4thCir <- sim(mnl.2.4thCir, x = effort.light.2.4thCir, x1 = effort.heavy.2.4thCir)
summary(s.out.mnl.2.4thCir)
plot(s.out.mnl.2.4thCir)



mnl.2.5thCir <- zelig(as.factor(OUTCOME.UNORDERED) ~ 
CASESPERJUDGE.CHANGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "mlogit", data = case.limited.2[case.limited.2$CIRCUIT==5,])

effort.light.2.5thCir <- setx(mnl.2.5thCir, CASESPERJUDGE.CHANGE = min(case.limited.2[case.limited.2$CIRCUIT==5,]$CASESPERJUDGE.CHANGE))
effort.heavy.2.5thCir <- setx(mnl.2.5thCir, CASESPERJUDGE.CHANGE = max(case.limited.2[case.limited.2$CIRCUIT==5,]$CASESPERJUDGE.CHANGE))
s.out.mnl.2.5thCir <- sim(mnl.2.5thCir, x = effort.light.2.5thCir, x1 = effort.heavy.2.5thCir)
summary(s.out.mnl.2.5thCir)
plot(s.out.mnl.2.5thCir)



mnl.2.6thCir <- zelig(as.factor(OUTCOME.UNORDERED) ~ 
CASESPERJUDGE.CHANGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "mlogit", data = case.limited.2[case.limited.2$CIRCUIT==6,])

effort.light.2.6thCir <- setx(mnl.2.6thCir, CASESPERJUDGE.CHANGE = min(case.limited.2[case.limited.2$CIRCUIT==6,]$CASESPERJUDGE.CHANGE))
effort.heavy.2.6thCir <- setx(mnl.2.6thCir, CASESPERJUDGE.CHANGE = max(case.limited.2[case.limited.2$CIRCUIT==6,]$CASESPERJUDGE.CHANGE))
s.out.mnl.2.6thCir <- sim(mnl.2.6thCir, x = effort.light.2.6thCir, x1 = effort.heavy.2.6thCir)
summary(s.out.mnl.2.6thCir)
plot(s.out.mnl.2.6thCir)



mnl.2.7thCir <- zelig(as.factor(OUTCOME.UNORDERED) ~ 
CASESPERJUDGE.CHANGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "mlogit", data = case.limited.2[case.limited.2$CIRCUIT==7,])

effort.light.2.7thCir <- setx(mnl.2.7thCir, CASESPERJUDGE.CHANGE = min(case.limited.2[case.limited.2$CIRCUIT==7,]$CASESPERJUDGE.CHANGE))
effort.heavy.2.7thCir <- setx(mnl.2.7thCir, CASESPERJUDGE.CHANGE = max(case.limited.2[case.limited.2$CIRCUIT==7,]$CASESPERJUDGE.CHANGE))
s.out.mnl.2.7thCir <- sim(mnl.2.7thCir, x = effort.light.2.7thCir, x1 = effort.heavy.2.7thCir)
summary(s.out.mnl.2.7thCir)




mnl.2.8thCir <- zelig(as.factor(OUTCOME.UNORDERED) ~ 
CASESPERJUDGE.CHANGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "mlogit", data = case.limited.2[case.limited.2$CIRCUIT==8,])

effort.light.2.8thCir <- setx(mnl.2.8thCir, CASESPERJUDGE.CHANGE = min(case.limited.2[case.limited.2$CIRCUIT==8,]$CASESPERJUDGE.CHANGE))
effort.heavy.2.8thCir <- setx(mnl.2.8thCir, CASESPERJUDGE.CHANGE = max(case.limited.2[case.limited.2$CIRCUIT==8,]$CASESPERJUDGE.CHANGE))
s.out.mnl.2.8thCir <- sim(mnl.2.8thCir, x = effort.light.2.8thCir, x1 = effort.heavy.2.8thCir)


mnl.2.9thCir <- zelig(as.factor(OUTCOME.UNORDERED) ~ 
CASESPERJUDGE.CHANGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "mlogit", data = case.limited.2[case.limited.2$CIRCUIT==9,])

effort.light.2.9thCir <- setx(mnl.2.9thCir, CASESPERJUDGE.CHANGE = min(case.limited.2[case.limited.2$CIRCUIT==9,]$CASESPERJUDGE.CHANGE))
effort.heavy.2.9thCir <- setx(mnl.2.9thCir, CASESPERJUDGE.CHANGE = max(case.limited.2[case.limited.2$CIRCUIT==9,]$CASESPERJUDGE.CHANGE))
s.out.mnl.2.9thCir <- sim(mnl.2.9thCir, x = effort.light.2.8thCir, x1 = effort.heavy.2.9thCir)



mnl.2.10thCir <- zelig(as.factor(OUTCOME.UNORDERED) ~ 
CASESPERJUDGE.CHANGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "mlogit", data = case.limited.2[case.limited.2$CIRCUIT==10,])

effort.light.2.10thCir <- setx(mnl.2.10thCir, CASESPERJUDGE.CHANGE = min(case.limited.2[case.limited.2$CIRCUIT==10,]$CASESPERJUDGE.CHANGE))
effort.heavy.2.10thCir <- setx(mnl.2.10thCir, CASESPERJUDGE.CHANGE = max(case.limited.2[case.limited.2$CIRCUIT==10,]$CASESPERJUDGE.CHANGE))
s.out.mnl.2.10thCir <- sim(mnl.2.10thCir, x = effort.light.2.10thCir, x1 = effort.heavy.2.10thCir)




mnl.2.11thCir <- zelig(as.factor(OUTCOME.UNORDERED) ~ 
CASESPERJUDGE.CHANGE +
GOP + DCTGOP + GOP*DCTGOP,
model = "mlogit", data = case.limited.2[case.limited.2$CIRCUIT==11,])

effort.light.2.11thCir <- setx(mnl.2.11thCir, CASESPERJUDGE.CHANGE = min(case.limited.2[case.limited.2$CIRCUIT==11,]$CASESPERJUDGE.CHANGE))
effort.heavy.2.11thCir <- setx(mnl.2.11thCir, CASESPERJUDGE.CHANGE = max(case.limited.2[case.limited.2$CIRCUIT==11,]$CASESPERJUDGE.CHANGE))
s.out.mnl.2.11thCir <- sim(mnl.2.11thCir, x = effort.light.2.11thCir, x1 = effort.heavy.2.11thCir)


summary(s.out.mnl.2.1stCir)
summary(s.out.mnl.2.2dCir)
summary(s.out.mnl.2.3dCir)
summary(s.out.mnl.2.4thCir)
summary(s.out.mnl.2.5thCir)
summary(s.out.mnl.2.6thCir)
summary(s.out.mnl.2.7thCir)
summary(s.out.mnl.2.8thCir)
summary(s.out.mnl.2.9thCir)
summary(s.out.mnl.2.10thCir)
summary(s.out.mnl.2.11thCir)


##################

## Treating possible outcomes as any outcome but "other":

## Creating dataframe:

case.limited.3 <- case[case$OUTCOME != 7,]

#ALL OUTCOMES, EXCEPT "OTHER":
OUTCOME.temp1 <- ifelse(case.limited.3$OUTCOME == 1, "AFFIRM",case.limited.3$OUTCOME)
OUTCOME.temp2 <- ifelse(case.limited.3$OUTCOME == 3, "AFFIRM IN PART",OUTCOME.temp1)
OUTCOME.temp3 <- ifelse(case.limited.3$OUTCOME == 5, "DISMISS FRIVOLOUS",OUTCOME.temp2)
OUTCOME.temp4 <- ifelse(case.limited.3$OUTCOME == 6, "REMAND",OUTCOME.temp3)
OUTCOME.temp5 <- ifelse(case.limited.3$OUTCOME == 2, "REVERSE",OUTCOME.temp4)
OUTCOME.temp6 <- ifelse(case.limited.3$OUTCOME == -8, "MISSING",OUTCOME.temp5)

case.limited.3$OUTCOME.UNORDERED <- OUTCOME.temp6

case.limited.3$OUTCOME.UNORDERED <- as.factor(case.limited.3$OUTCOME.UNORDERED)
case.limited.3$JUDGQY <- as.factor(case.limited.3$JUDGQY) 
case.limited.3$CIRCUIT <- as.factor(case.limited.3$CIRCUIT) 

#

vars <- c("OUTCOME.UNORDERED", "JUDG.CHANGE", "DOCKET.CHANGE", "CASESPERJUDGE.CHANGE", "JUDGQY", "CIRCUIT", "GOP", "DCTGOP")
case.limited.4 <- na.omit(case.limited.3[,vars])
case.limited.4$JUDGQY3 <- case.limited.4$JUDGQY[case.limited.4$JUDGQY!=19974]
case.limited.4$JUDGQY3 <- factor(case.limited.4$JUDGQY3)

# Running models:

# Multinomial version of Huang's model:

mnl.full.1 <- zelig(as.factor(OUTCOME.UNORDERED)~
FLOOD.2d.v1 + FLOOD.9th.v1 +
TRANS.2d.v1 + TRANS.9th.v1 + TREND.2d + TREND.9th + 
CHANGEt.2d.v1 + CHANGEf.2d.v1 + CHANGEt.9th.v1 + CHANGEf.9th.v1 + 
VACANCY + JUDGQY + CIRCUIT + GOP + DCTGOP + GOP*DCTGOP,
model = "mlogit", data = case.limited.3)

x.noflood.full <- setx(mnl.full.1, FLOOD.2d.v1 = 0)
x.flood.full <- setx(mnl.full.1, FLOOD.2d.v1 = 1)
s.out.mnl.full.1 <- sim(mnl.full.1, x = x.noflood.full, x1 = x.flood.full)
summary(s.out.mnl.full.1)
plot(s.out.mnl.full.1)

#

mnl.full.ACTIVEJ <- zelig(as.factor(OUTCOME.UNORDERED)  ~ 
ACTIVEJ + JUDGQYDOCKET +
JUDGQY + CIRCUIT + GOP + DCTGOP + GOP*DCTGOP, 
model = "mlogit", data = case.limited.3)

effort.light.full.ACTIVEJ <- setx(mnl.full.ACTIVEJ, ACTIVEJ = max(case.limited.3$ACTIVEJ),JUDGQYDOCKET = min(case.limited.3$JUDGQYDOCKET))
effort.heavy.full.ACTIVEJ <- setx(mnl.full.ACTIVEJ, ACTIVEJ = min(case.limited.3$ACTIVEJ),JUDGQYDOCKET = max(case.limited.3$JUDGQYDOCKET))
s.out.mnl.full.ACTIVEJ <- sim(mnl.full.ACTIVEJ, x = effort.light.full.ACTIVEJ , x1 = effort.heavy.full.ACTIVEJ)
summary(s.out.mnl.full.ACTIVEJ)
plot(s.out.mnl.full.ACTIVEJ)

#


mnl.full.CASESPERJUDGE <- zelig(as.factor(OUTCOME.UNORDERED) ~ 
CASESPERJUDGE +
JUDGQY + CIRCUIT + GOP + DCTGOP + GOP*DCTGOP,
model = "mlogit", data = case.limited.3)

effort.light.full.CASESPERJUDGE <- setx(mnl.full.CASESPERJUDGE, CASESPERJUDGE = min(case.limited.3$CASESPERJUDGE))
effort.heavy.full.CASESPERJUDGE <- setx(mnl.full.CASESPERJUDGE, CASESPERJUDGE = max(case.limited.3$CASESPERJUDGE))
s.out.mnl.full.CASESPERJUDGE <- sim(mnl.full.CASESPERJUDGE, x = effort.light.full.CASESPERJUDGE, x1 = effort.heavy.full.CASESPERJUDGE)
summary(s.out.mnl.full.CASESPERJUDGE)
plot(s.out.mnl.full.CASESPERJUDGE)


#

mnl.full.ACTIVEJ.CHANGE <- zelig(as.factor(OUTCOME.UNORDERED)  ~ 
JUDG.CHANGE + DOCKET.CHANGE + GOP + DCTGOP + GOP*DCTGOP, 
model = "mlogit", data = case.limited.4)

effort.light.full.ACTIVEJ.CHANGE <- setx(mnl.full.ACTIVEJ.CHANGE, 
JUDG.CHANGE = max(na.omit(case.limited.4$JUDG.CHANGE)),
DOCKET.CHANGE = min(na.omit(case.limited.4$DOCKET.CHANGE)))
effort.heavy.full.ACTIVEJ.CHANGE <- setx(mnl.full.ACTIVEJ.CHANGE, 
JUDG.CHANGE = min((na.omit(case.limited.4$JUDG.CHANGE)),
DOCKET.CHANGE = max(na.omit(case.limited.4$DOCKET.CHANGE))))
s.out.mnl.full.ACTIVEJ.CHANGE <- sim(mnl.full.ACTIVEJ.CHANGE, x = effort.light.full.ACTIVEJ.CHANGE , x1 = effort.heavy.full.ACTIVEJ.CHANGE)
summary(s.out.mnl.full.ACTIVEJ.CHANGE)
plot(s.out.mnl.full.ACTIVEJ.CHANGE)


#

mnl.full.CASESPERJUDGE.CHANGE <- zelig(as.factor(OUTCOME.UNORDERED) ~ 
CASESPERJUDGE.CHANGE +
JUDGQY3 + CIRCUIT + GOP + DCTGOP + GOP*DCTGOP,
model = "mlogit", data = case.limited.4)

effort.heavy.full.CASESPERJUDGE.CHANGE<- setx(mnl.full.CASESPERJUDGE.CHANGE, CASESPERJUDGE.CHANGE = max(case.limited.4$CASESPERJUDGE.CHANGE))
effort.light.full.CASESPERJUDGE.CHANGE <- setx(mnl.full.CASESPERJUDGE.CHANGE, CASESPERJUDGE.CHANGE = min(case.limited.4$CASESPERJUDGE.CHANGE))
s.out.mnl.full.CASESPERJUDGE.CHANGE <- sim(mnl.full.CASESPERJUDGE.CHANGE, x = effort.heavy.full.CASESPERJUDGE.CHANGE, x1 = effort.light.full.CASESPERJUDGE.CHANGE)
summary(s.out.mnl.full.CASESPERJUDGE.CHANGE)
plot(s.out.mnl.full.CASESPERJUDGE.CHANGE)


#

# By circuit:

# Multinomial version of Huang's model, split out by circuit:

mnl.full.1.2dCir <- zelig(as.factor(OUTCOME.UNORDERED)~
FLOOD.2d.v1 + TRANS.2d.v1 + TREND.2d + CHANGEt.2d.v1 + CHANGEf.2d.v1 + 
VACANCY + JUDGQY + GOP + DCTGOP + GOP*DCTGOP,
model = "mlogit", data = case.limited.3)

x.noflood.full.2dCir <- setx(mnl.full.1.2dCir, FLOOD.2d.v1 = 0)
x.flood.full.2dCir <- setx(mnl.full.1.2dCir, FLOOD.2d.v1 = 1)
s.out.mnl.full.1.2dCir <- sim(mnl.full.1.2dCir, x = x.noflood.full.2dCir, x1 = x.flood.full.2dCir)
summary(s.out.mnl.full.1.2dCir)
plot(s.out.mnl.full.1.2dCir)

mnl.full.1.9thCir <- zelig(as.factor(OUTCOME.UNORDERED)~
FLOOD.9th.v1 + TRANS.9th.v1 + TREND.9th + CHANGEt.9th.v1 + CHANGEf.9th.v1 + 
VACANCY + JUDGQY + GOP + DCTGOP + GOP*DCTGOP,
model = "mlogit", data = case.limited.3)

x.noflood.full.9thCir <- setx(mnl.full.1.9thCir, FLOOD.9th.v1 = 0)
x.flood.full.9thCir <- setx(mnl.full.1.9thCir, FLOOD.9th.v1 = 1)
s.out.mnl.full.1.9thCir <- sim(mnl.full.1.9thCir, x = x.noflood.full.9thCir, x1 = x.flood.full.9thCir)
summary(s.out.mnl.full.1.9thCir)
plot(s.out.mnl.full.1.9thCir)

# TV of change in cases per judge:


mnl.full.2.1stCir <- zelig(as.factor(OUTCOME.UNORDERED) ~ 
CASESPERJUDGE.CHANGE
+ GOP + DCTGOP + GOP*DCTGOP,
model = "mlogit", data = case.limited.4[case.limited.4$CIRCUIT==1,])

effort.light.full.2.1stCir <- setx(mnl.full.2.1stCir, CASESPERJUDGE.CHANGE = min(case.limited.4[case.limited.4$CIRCUIT==1,]$CASESPERJUDGE.CHANGE))
effort.heavy.full.2.1stCir <- setx(mnl.full.2.1stCir, CASESPERJUDGE.CHANGE = max(case.limited.4[case.limited.4$CIRCUIT==1,]$CASESPERJUDGE.CHANGE))
s.out.mnl.full.2.1stCir <- sim(mnl.full.2.1stCir, x = effort.light.full.2.1stCir, x1 = effort.heavy.full.2.1stCir)
summary(s.out.mnl.full.2.1stCir)
plot(s.out.mnl.full.2.1stCir)


mnl.full.2.2dCir <- zelig(as.factor(OUTCOME.UNORDERED) ~ 
CASESPERJUDGE.CHANGE
+ GOP + DCTGOP + GOP*DCTGOP,
model = "mlogit", data = case.limited.4[case.limited.4$CIRCUIT==2,])

effort.light.full.2.2dCir <- setx(mnl.full.2.2dCir, CASESPERJUDGE.CHANGE = min(case.limited.4[case.limited.4$CIRCUIT==2,]$CASESPERJUDGE.CHANGE))
effort.heavy.full.2.2dCir <- setx(mnl.full.2.2dCir, CASESPERJUDGE.CHANGE = max(case.limited.4[case.limited.4$CIRCUIT==2,]$CASESPERJUDGE.CHANGE))
s.out.mnl.full.2.2dCir <- sim(mnl.full.2.2dCir, x = effort.light.full.2.2dCir, x1 = effort.heavy.full.2.2dCir)
summary(s.out.mnl.full.2.2dCir)
plot(s.out.mnl.full.2.2dCir)


mnl.full.2.3dCir <- zelig(as.factor(OUTCOME.UNORDERED) ~ 
CASESPERJUDGE.CHANGE
+ GOP + DCTGOP + GOP*DCTGOP,
model = "mlogit", data = case.limited.4[case.limited.4$CIRCUIT==3,])

effort.light.full.2.3dCir <- setx(mnl.full.2.3dCir, CASESPERJUDGE.CHANGE = min(case.limited.4[case.limited.4$CIRCUIT==3,]$CASESPERJUDGE.CHANGE))
effort.heavy.full.2.3dCir <- setx(mnl.full.2.3dCir, CASESPERJUDGE.CHANGE = max(case.limited.4[case.limited.4$CIRCUIT==3,]$CASESPERJUDGE.CHANGE))
s.out.mnl.full.2.3dCir <- sim(mnl.full.2.3dCir, x = effort.light.full.2.3dCir, x1 = effort.heavy.full.2.3dCir)
summary(s.out.mnl.full.2.3dCir)
plot(s.out.mnl.full.2.3dCir)


mnl.full.2.4thCir <- zelig(as.factor(OUTCOME.UNORDERED) ~ 
CASESPERJUDGE.CHANGE
+ GOP + DCTGOP + GOP*DCTGOP,
model = "mlogit", data = case.limited.4[case.limited.4$CIRCUIT==4,])

effort.light.full.2.4thCir <- setx(mnl.full.2.4thCir, CASESPERJUDGE.CHANGE = min(case.limited.4[case.limited.4$CIRCUIT==4,]$CASESPERJUDGE.CHANGE))
effort.heavy.full.2.4thCir <- setx(mnl.full.2.4thCir, CASESPERJUDGE.CHANGE = max(case.limited.4[case.limited.4$CIRCUIT==4,]$CASESPERJUDGE.CHANGE))
s.out.mnl.full.2.4thCir <- sim(mnl.full.2.4thCir, x = effort.light.full.2.4thCir, x1 = effort.heavy.full.2.4thCir)
summary(s.out.mnl.full.2.4thCir)
plot(s.out.mnl.full.2.4thCir)


mnl.full.2.5thCir <- zelig(as.factor(OUTCOME.UNORDERED) ~ 
CASESPERJUDGE.CHANGE
+ GOP + DCTGOP + GOP*DCTGOP,
model = "mlogit", data = case.limited.4[case.limited.4$CIRCUIT==5,])

effort.light.full.2.5thCir <- setx(mnl.full.2.5thCir, CASESPERJUDGE.CHANGE = min(case.limited.4[case.limited.4$CIRCUIT==5,]$CASESPERJUDGE.CHANGE))
effort.heavy.full.2.5thCir <- setx(mnl.full.2.5thCir, CASESPERJUDGE.CHANGE = max(case.limited.4[case.limited.4$CIRCUIT==5,]$CASESPERJUDGE.CHANGE))
s.out.mnl.full.2.5thCir <- sim(mnl.full.2.5thCir, x = effort.light.full.2.5thCir, x1 = effort.heavy.full.2.5thCir)
summary(s.out.mnl.full.2.5thCir)
plot(s.out.mnl.full.2.5thCir)

###ERROR###
mnl.full.2.6thCir <- zelig(as.factor(OUTCOME.UNORDERED) ~ 
CASESPERJUDGE.CHANGE
+ GOP + DCTGOP + GOP*DCTGOP,
model = "mlogit", data = case.limited.4[case.limited.4$CIRCUIT==6,])

effort.light.full.2.6thCir <- setx(mnl.full.2.6thCir, CASESPERJUDGE.CHANGE = min(case.limited.4[case.limited.4$CIRCUIT==6,]$CASESPERJUDGE.CHANGE))
effort.heavy.full.2.6thCir <- setx(mnl.full.2.6thCir, CASESPERJUDGE.CHANGE = max(case.limited.4[case.limited.4$CIRCUIT==6,]$CASESPERJUDGE.CHANGE))
s.out.mnl.full.2.6thCir <- sim(mnl.full.2.6thCir, x = effort.light.full.2.6thCir, x1 = effort.heavy.full.2.6thCir)
summary(s.out.mnl.full.2.6thCir)
plot(s.out.mnl.full.2.6thCir)


mnl.full.2.7thCir <- zelig(as.factor(OUTCOME.UNORDERED) ~ 
CASESPERJUDGE.CHANGE
+ GOP + DCTGOP + GOP*DCTGOP,
model = "mlogit", data = case.limited.4[case.limited.4$CIRCUIT==7,])

effort.light.full.2.7thCir <- setx(mnl.full.2.7thCir, CASESPERJUDGE.CHANGE = min(case.limited.4[case.limited.4$CIRCUIT==7,]$CASESPERJUDGE.CHANGE))
effort.heavy.full.2.7thCir <- setx(mnl.full.2.7thCir, CASESPERJUDGE.CHANGE = max(case.limited.4[case.limited.4$CIRCUIT==7,]$CASESPERJUDGE.CHANGE))
s.out.mnl.full.2.7thCir <- sim(mnl.full.2.7thCir, x = effort.light.full.2.7thCir, x1 = effort.heavy.full.2.7thCir)
summary(s.out.mnl.full.2.7thCir)
plot(s.out.mnl.full.2.7thCir)


mnl.full.2.8thCir <- zelig(as.factor(OUTCOME.UNORDERED) ~ 
CASESPERJUDGE.CHANGE
+ GOP + DCTGOP + GOP*DCTGOP,
model = "mlogit", data = case.limited.4[case.limited.4$CIRCUIT==8,])

effort.light.full.2.8thCir <- setx(mnl.full.2.8thCir, CASESPERJUDGE.CHANGE = min(case.limited.4[case.limited.4$CIRCUIT==8,]$CASESPERJUDGE.CHANGE))
effort.heavy.full.2.8thCir <- setx(mnl.full.2.8thCir, CASESPERJUDGE.CHANGE = max(case.limited.4[case.limited.4$CIRCUIT==8,]$CASESPERJUDGE.CHANGE))
s.out.mnl.full.2.8thCir <- sim(mnl.full.2.8thCir, x = effort.light.full.2.8thCir, x1 = effort.heavy.full.2.8thCir)
summary(s.out.mnl.full.2.8thCir)
plot(s.out.mnl.full.2.8thCir)

mnl.full.2.9thCir <- zelig(as.factor(OUTCOME.UNORDERED) ~ 
CASESPERJUDGE.CHANGE
+ GOP + DCTGOP + GOP*DCTGOP,
model = "mlogit", data = case.limited.4[case.limited.4$CIRCUIT==9,])

effort.light.full.2.9thCir <- setx(mnl.full.2.9thCir, CASESPERJUDGE.CHANGE = min(case.limited.4[case.limited.4$CIRCUIT==9,]$CASESPERJUDGE.CHANGE))
effort.heavy.full.2.9thCir <- setx(mnl.full.2.9thCir, CASESPERJUDGE.CHANGE = max(case.limited.4[case.limited.4$CIRCUIT==9,]$CASESPERJUDGE.CHANGE))
s.out.mnl.full.2.9thCir <- sim(mnl.full.2.9thCir, x = effort.light.full.2.9thCir, x1 = effort.heavy.full.2.9thCir)
summary(s.out.mnl.full.2.9thCir)
plot(s.out.mnl.full.2.9thCir)


mnl.full.2.10thCir <- zelig(as.factor(OUTCOME.UNORDERED) ~ 
CASESPERJUDGE.CHANGE
+ GOP + DCTGOP + GOP*DCTGOP,
model = "mlogit", data = case.limited.4[case.limited.4$CIRCUIT==10,])

effort.light.full.2.10thCir <- setx(mnl.full.2.10thCir, CASESPERJUDGE.CHANGE = min(case.limited.4[case.limited.4$CIRCUIT==10,]$CASESPERJUDGE.CHANGE))
effort.heavy.full.2.10thCir <- setx(mnl.full.2.10thCir, CASESPERJUDGE.CHANGE = max(case.limited.4[case.limited.4$CIRCUIT==10,]$CASESPERJUDGE.CHANGE))
s.out.mnl.full.2.10thCir <- sim(mnl.full.2.10thCir, x = effort.light.full.2.10thCir, x1 = effort.heavy.full.2.10thCir)
summary(s.out.mnl.full.2.10thCir)
plot(s.out.mnl.full.2.10thCir)


mnl.full.2.11thCir <- zelig(as.factor(OUTCOME.UNORDERED) ~ 
CASESPERJUDGE.CHANGE
+ GOP + DCTGOP + GOP*DCTGOP,
model = "mlogit", data = case.limited.4[case.limited.4$CIRCUIT==11,])

effort.light.full.2.11thCir <- setx(mnl.full.2.11thCir, CASESPERJUDGE.CHANGE = min(case.limited.4[case.limited.4$CIRCUIT==11,]$CASESPERJUDGE.CHANGE))
effort.heavy.full.2.11thCir <- setx(mnl.full.2.11thCir, CASESPERJUDGE.CHANGE = max(case.limited.4[case.limited.4$CIRCUIT==11,]$CASESPERJUDGE.CHANGE))
s.out.mnl.full.2.11thCir <- sim(mnl.full.2.11thCir, x = effort.light.full.2.11thCir, x1 = effort.heavy.full.2.11thCir)
summary(s.out.mnl.full.2.11thCir)
plot(s.out.mnl.full.2.11thCir)

#

TV of change in number of judges and change in number of cases:


mnl.full.4.1stCir <- zelig(as.factor(OUTCOME.UNORDERED)  ~ 
JUDG.CHANGE + DOCKET.CHANGE + GOP + DCTGOP + GOP*DCTGOP, 
model = "mlogit", data = case.limited.4[case.limited.4$CIRCUIT==1,])

effort.light.full.4.1stCir <- setx(mnl.full.4.1stCir, 
JUDG.CHANGE = max(na.omit(case.limited.4[case.limited.4$CIRCUIT==1,]$JUDG.CHANGE)),
DOCKET.CHANGE = min(na.omit(case.limited.4[case.limited.4$CIRCUIT==1,]$DOCKET.CHANGE)))
effort.heavy.full.4.1stCir <- setx(mnl.full.4.1stCir, 
JUDG.CHANGE = min((na.omit(case.limited.4[case.limited.4$CIRCUIT==1,]$JUDG.CHANGE)),
DOCKET.CHANGE = max(na.omit(case.limited.4[case.limited.4$CIRCUIT==1,]$DOCKET.CHANGE))))
s.out.mnl.full.4.1stCir <- sim(mnl.full.4.1stCir, x = effort.light.full.4.1stCir , x1 = effort.heavy.full.4.1stCir)
summary(s.out.mnl.full.4.1stCir)
plot(s.out.mnl.full.4.1stCir)


mnl.full.4.2ndCir <- zelig(as.factor(OUTCOME.UNORDERED)  ~ 
JUDG.CHANGE + DOCKET.CHANGE + GOP + DCTGOP + GOP*DCTGOP, 
model = "mlogit", data = case.limited.4[case.limited.4$CIRCUIT==2,])

effort.light.full.4.2ndCir <- setx(mnl.full.4.2ndCir, 
JUDG.CHANGE = max(na.omit(case.limited.4[case.limited.4$CIRCUIT==2,]$JUDG.CHANGE)),
DOCKET.CHANGE = min(na.omit(case.limited.4[case.limited.4$CIRCUIT==2,]$DOCKET.CHANGE)))
effort.heavy.full.4.2dCir <- setx(mnl.full.4.1stCir, 
JUDG.CHANGE = min((na.omit(case.limited.4[case.limited.4$CIRCUIT==2,]$JUDG.CHANGE)),
DOCKET.CHANGE = max(na.omit(case.limited.4[case.limited.4$CIRCUIT==2,]$DOCKET.CHANGE))))
s.out.mnl.full.4.2dCir <- sim(mnl.full.4.2ndCir, x = effort.light.full.4.2ndCir, x1 = effort.heavy.full.4.2dCir)
summary(s.out.mnl.full.4.2dCir)
plot(s.out.mnl.full.4.2dCir)


mnl.full.4.3dCir <- zelig(as.factor(OUTCOME.UNORDERED)  ~ 
JUDG.CHANGE + DOCKET.CHANGE + GOP + DCTGOP + GOP*DCTGOP, 
model = "mlogit", data = case.limited.4[case.limited.4$CIRCUIT==3,])

effort.light.full.4.3dCir <- setx(mnl.full.4.3dCir, 
JUDG.CHANGE = max(na.omit(case.limited.4[case.limited.4$CIRCUIT==3,]$JUDG.CHANGE)),
DOCKET.CHANGE = min(na.omit(case.limited.4[case.limited.4$CIRCUIT==3,]$DOCKET.CHANGE)))
effort.heavy.full.4.3dCir <- setx(mnl.full.4.3dCir, 
JUDG.CHANGE = min((na.omit(case.limited.4[case.limited.4$CIRCUIT==3,]$JUDG.CHANGE)),
DOCKET.CHANGE = max(na.omit(case.limited.4[case.limited.4$CIRCUIT==3,]$DOCKET.CHANGE))))
s.out.mnl.full.4.3dCir <- sim(mnl.full.4.3dCir, x = effort.light.full.4.3dCir , x1 = effort.heavy.full.4.3dCir)
summary(s.out.mnl.full.4.3dCir)
plot(s.out.mnl.full.4.3dCir)


mnl.full.4.4thCir <- zelig(as.factor(OUTCOME.UNORDERED)  ~ 
JUDG.CHANGE + DOCKET.CHANGE + GOP + DCTGOP + GOP*DCTGOP, 
model = "mlogit", data = case.limited.4[case.limited.4$CIRCUIT==4,])

effort.light.full.4.4thCir <- setx(mnl.full.4.4thCir, 
JUDG.CHANGE = max(na.omit(case.limited.4[case.limited.4$CIRCUIT==4,]$JUDG.CHANGE)),
DOCKET.CHANGE = min(na.omit(case.limited.4[case.limited.4$CIRCUIT==4,]$DOCKET.CHANGE)))
effort.heavy.full.4.4thCir <- setx(mnl.full.4.4thCir, 
JUDG.CHANGE = min((na.omit(case.limited.4[case.limited.4$CIRCUIT==4,]$JUDG.CHANGE)),
DOCKET.CHANGE = max(na.omit(case.limited.4[case.limited.4$CIRCUIT==4,]$DOCKET.CHANGE))))
s.out.mnl.full.4.4thCir <- sim(mnl.full.4.4thCir, x = effort.light.full.4.4thCir , x1 = effort.heavy.full.4.4thCir)
summary(s.out.mnl.full.4.4thCir)
plot(s.out.mnl.full.4.4thCir)


mnl.full.4.5thCir <- zelig(as.factor(OUTCOME.UNORDERED)  ~ 
JUDG.CHANGE + DOCKET.CHANGE + GOP + DCTGOP + GOP*DCTGOP, 
model = "mlogit", data = case.limited.4[case.limited.4$CIRCUIT==5,])

effort.light.full.4.5thCir <- setx(mnl.full.4.5thCir, 
JUDG.CHANGE = max(na.omit(case.limited.4[case.limited.4$CIRCUIT==5,]$JUDG.CHANGE)),
DOCKET.CHANGE = min(na.omit(case.limited.4[case.limited.4$CIRCUIT==5,]$DOCKET.CHANGE)))
effort.heavy.full.4.5thCir <- setx(mnl.full.4.5thCir, 
JUDG.CHANGE = min((na.omit(case.limited.4[case.limited.4$CIRCUIT==5,]$JUDG.CHANGE)),
DOCKET.CHANGE = max(na.omit(case.limited.4[case.limited.4$CIRCUIT==5,]$DOCKET.CHANGE))))
s.out.mnl.full.4.5thCir <- sim(mnl.full.4.5thCir, x = effort.light.full.4.5thCir , x1 = effort.heavy.full.4.5thCir)
summary(s.out.mnl.full.4.5thCir)
plot(s.out.mnl.full.4.5thCir)




#THIS HAS AN ERROR:

mnl.full.4.6thCir <- zelig(as.factor(OUTCOME.UNORDERED)  ~ 
JUDG.CHANGE + DOCKET.CHANGE + GOP + DCTGOP + GOP*DCTGOP, 
model = "mlogit", data = case.limited.4[case.limited.4$CIRCUIT==6,])

effort.light.full.4.6thCir <- setx(mnl.full.4.6thCir, 
JUDG.CHANGE = max(na.omit(case.limited.4[case.limited.4$CIRCUIT==6,]$JUDG.CHANGE)),
DOCKET.CHANGE = min(na.omit(case.limited.4[case.limited.4$CIRCUIT==6,]$DOCKET.CHANGE)))
effort.heavy.full.4.6thCir <- setx(mnl.full.4.6thCir, 
JUDG.CHANGE = min((na.omit(case.limited.4[case.limited.4$CIRCUIT==6,]$JUDG.CHANGE)),
DOCKET.CHANGE = max(na.omit(case.limited.4[case.limited.4$CIRCUIT==6,]$DOCKET.CHANGE))))
s.out.mnl.full.4.6thCir <- sim(mnl.full.4.6thCir, x=effort.light.full.4.6thCir, x1=effort.heavy.full.4.6thCir)
summary(s.out.mnl.full.4.6thCir)
plot(s.out.mnl.full.4.6thCir)






mnl.full.4.7thCir <- zelig(as.factor(OUTCOME.UNORDERED)  ~ 
JUDG.CHANGE + DOCKET.CHANGE + GOP + DCTGOP + GOP*DCTGOP, 
model = "mlogit", data = case.limited.4[case.limited.4$CIRCUIT==7,])

effort.light.full.4.7thCir <- setx(mnl.full.4.7thCir, 
JUDG.CHANGE = max(na.omit(case.limited.4[case.limited.4$CIRCUIT==7,]$JUDG.CHANGE)),
DOCKET.CHANGE = min(na.omit(case.limited.4[case.limited.4$CIRCUIT==7,]$DOCKET.CHANGE)))
effort.heavy.full.4.7thCir <- setx(mnl.full.4.7thCir, 
JUDG.CHANGE = min((na.omit(case.limited.4[case.limited.4$CIRCUIT==7,]$JUDG.CHANGE)),
DOCKET.CHANGE = max(na.omit(case.limited.4[case.limited.4$CIRCUIT==7,]$DOCKET.CHANGE))))
s.out.mnl.full.4.7thCir <- sim(mnl.full.4.7thCir, x = effort.light.full.4.7thCir , x1 = effort.heavy.full.4.7thCir)
summary(s.out.mnl.full.4.7thCir)
plot(s.out.mnl.full.4.7thCir)


mnl.full.4.8thCir <- zelig(as.factor(OUTCOME.UNORDERED)  ~ 
JUDG.CHANGE + DOCKET.CHANGE + GOP + DCTGOP + GOP*DCTGOP, 
model = "mlogit", data = case.limited.4[case.limited.4$CIRCUIT==8,])

effort.light.full.4.8thCir <- setx(mnl.full.4.8thCir, 
JUDG.CHANGE = max(na.omit(case.limited.4[case.limited.4$CIRCUIT==8,]$JUDG.CHANGE)),
DOCKET.CHANGE = min(na.omit(case.limited.4[case.limited.4$CIRCUIT==8,]$DOCKET.CHANGE)))
effort.heavy.full.4.8thCir <- setx(mnl.full.4.8thCir, 
JUDG.CHANGE = min((na.omit(case.limited.4[case.limited.4$CIRCUIT==8,]$JUDG.CHANGE)),
DOCKET.CHANGE = max(na.omit(case.limited.4[case.limited.4$CIRCUIT==8,]$DOCKET.CHANGE))))
s.out.mnl.full.4.8thCir <- sim(mnl.full.4.8thCir, x = effort.light.full.4.8thCir , x1 = effort.heavy.full.4.8thCir)
summary(s.out.mnl.full.4.8thCir)
plot(s.out.mnl.full.4.8thCir)


mnl.full.4.9thCir <- zelig(as.factor(OUTCOME.UNORDERED)  ~ 
JUDG.CHANGE + DOCKET.CHANGE + GOP + DCTGOP + GOP*DCTGOP, 
model = "mlogit", data = case.limited.4[case.limited.4$CIRCUIT==9,])

effort.light.full.4.9thCir <- setx(mnl.full.4.9thCir, 
JUDG.CHANGE = max(na.omit(case.limited.4[case.limited.4$CIRCUIT==9,]$JUDG.CHANGE)),
DOCKET.CHANGE = min(na.omit(case.limited.4[case.limited.4$CIRCUIT==9,]$DOCKET.CHANGE)))
effort.heavy.full.4.9thCir <- setx(mnl.full.4.9thCir, 
JUDG.CHANGE = min((na.omit(case.limited.4[case.limited.4$CIRCUIT==9,]$JUDG.CHANGE)),
DOCKET.CHANGE = max(na.omit(case.limited.4[case.limited.4$CIRCUIT==9,]$DOCKET.CHANGE))))
s.out.mnl.full.4.9thCir <- sim(mnl.full.4.9thCir, x = effort.light.full.4.9thCir , x1 = effort.heavy.full.4.9thCir)
summary(s.out.mnl.full.4.9thCir)
plot(s.out.mnl.full.4.9thCir)



mnl.full.4.10thCir <- zelig(as.factor(OUTCOME.UNORDERED)  ~ 
JUDG.CHANGE + DOCKET.CHANGE + GOP + DCTGOP + GOP*DCTGOP, 
model = "mlogit", data = case.limited.4[case.limited.4$CIRCUIT==10,])

effort.light.full.4.10thCir <- setx(mnl.full.4.10thCir, 
JUDG.CHANGE = max(na.omit(case.limited.4[case.limited.4$CIRCUIT==10,]$JUDG.CHANGE)),
DOCKET.CHANGE = min(na.omit(case.limited.4[case.limited.4$CIRCUIT==10,]$DOCKET.CHANGE)))
effort.heavy.full.4.10thCir <- setx(mnl.full.4.10thCir, 
JUDG.CHANGE = min((na.omit(case.limited.4[case.limited.4$CIRCUIT==10,]$JUDG.CHANGE)),
DOCKET.CHANGE = max(na.omit(case.limited.4[case.limited.4$CIRCUIT==10,]$DOCKET.CHANGE))))
s.out.mnl.full.4.10thCir <- sim(mnl.full.4.10thCir, x = effort.light.full.4.10thCir , x1 = effort.heavy.full.4.10thCir)
summary(s.out.mnl.full.4.10thCir)
plot(s.out.mnl.full.4.10thCir)


mnl.full.4.11thCir <- zelig(as.factor(OUTCOME.UNORDERED)  ~ 
JUDG.CHANGE + DOCKET.CHANGE + GOP + DCTGOP + GOP*DCTGOP, 
model = "mlogit", data = case.limited.4[case.limited.4$CIRCUIT==11,])

effort.light.full.4.11thCir <- setx(mnl.full.4.11thCir, 
JUDG.CHANGE = max(na.omit(case.limited.4[case.limited.4$CIRCUIT==11,]$JUDG.CHANGE)),
DOCKET.CHANGE = min(na.omit(case.limited.4[case.limited.4$CIRCUIT==11,]$DOCKET.CHANGE)))
effort.heavy.full.4.11thCir <- setx(mnl.full.4.11thCir, 
JUDG.CHANGE = min((na.omit(case.limited.4[case.limited.4$CIRCUIT==11,]$JUDG.CHANGE)),
DOCKET.CHANGE = max(na.omit(case.limited.4[case.limited.4$CIRCUIT==11,]$DOCKET.CHANGE))))
s.out.mnl.full.4.11thCir <- sim(mnl.full.4.11thCir, x = effort.light.full.4.11thCir , x1 = effort.heavy.full.4.11thCir)
summary(s.out.mnl.full.4.11thCir)
plot(s.out.mnl.full.4.11thCir)
